1
votes

in Zend Framework Quickstart,

protected function _initAutoload() {
    $autoloader = new Zend_Application_Module_Autoloader(array(
        'namespace' => 'Default_',
        'basePath'  => dirname(__FILE__),
    ));
    return $autoloader;
}

i thought if the namespace was 'Default', i dont need to specify it?

eg. their class also has Default_ appended to it

class Default_Model_Guestbook

isit required? or isit better practice?

1

1 Answers

2
votes

The manual states it is certainly not required. But you could say it's a good practice. If you do namespace it you could edit your 'default module' in the config and you don't have to go namespace the previous default one...

this can be done by setting the prefixDefaultModule:

resources.frontController.prefixDefaultModule = 1

also have a look at this question: Dynamic default mdoule in ZF