heya guys, been attempting to migrate a zf app to use zend bootstrap but am
hitting some walls, and would appreciate some pointers.

In my index.php i have the following:
$appRootDir = dirname(dirname(__FILE__));
        set_include_path(implode(PATH_SEPARATOR, array(
                        $appRootDir . DIRECTORY_SEPARATOR . 'library',
                        get_include_path(),
      )));
      
      /** Zend_Application */
      require_once 'Zend/Application.php';

    // Create application, bootstrap, and run
        $application = new Zend_Application(
                APPLICATION_ENV,
                APPLICATION_PATH . '/configs/application.ini'
        );

        $application->bootstrap()->run();


...and the following in the bootstrap.php
protected function _initAutoload(){
                $autoloader = new Zend_Application_Module_Autoloader(array(
                    'namespace' => 'MyApp',
                    'basePath' => dirname(__FILE__),
                ));

                return $autoloader;                             
                }

1). Where i usually stored the models in /application/models, am i correct
in thinking that i now need to rewrite the class definition to include the
namespace, for eg /application/models/menu/site.php would need a class name
of MyApp_Model_Menu_Site?

2). I have another library of code located at /application/library/myRepo.
The example class name in question #1 uses a class from this library
location, yet (the current implementation of) Menu_Site_MainMenu extends
MyRepo_Menu_Abstract is not working (fatal error - class not found). Do i
need to create a seperate namespace for each library included? If so, why is
there not one declared for the zf?


Thanks.
-- 
View this message in context: 
http://n4.nabble.com/bootstrap-include-path-confusion-tp1475010p1475010.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to