views:

114

answers:

1

We are working on a new zend framework project and most things are going fine with the bootstrap:

<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initAutoload()
    {
        $autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'List8D',
            'basePath'  => dirname(__FILE__),
        ));

        return $autoloader;
    }

    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_TRANSITIONAL');
    }

    protected function _initRegistry()
    {
        $this->bootstrap('db');
        Zend_Registry::set('dbResource', $this->getPluginResource('db'));
    } 


}

but we want to add a second path to the List8D Namespace so that if the autoloader can not find it in dirname(__FILE__) it looks there

I've look in the documentation and found lots on adding a namespace but nothing on having multiple paths for the same namespace

A: 

Specifying basePath as array doesn't work? But I think it doesn't make much of a sense to do this.

Follow mind map:

are your classes application specific or global:
  specific
    move both folders to one folder inside application
  global 
    move both folders to one folder inside your include path
  some are specific, some global
    separate them to different namespaces

I'm not aware of any situation where you should have same prefixed classes in different folder...

Tomáš Fejfar