Hi,

I have been trying out Zend_App again as it seems to be moving on a
bit now, I am having some problems using modules, I keep getting:

Maximum function nesting level of '100' reached, aborting! in
/home/keith/www/ZApp/library/Zend/Loader/PluginLoader.php on line 125

I have been trying to track down whats causing this for a while but
with no success, it seems to be when the modules bootstrap is called
it recalls everything???

Also I was wondering why the modules resource skips the default
module, how do you say add autoloader paths to the default module?

I am using the structure:

modules
   module1
   module2

And my app setup:

<?php
$paths = array(
    get_include_path(),
    '../library/Incu',
     '../library',
);
set_include_path(join(PATH_SEPARATOR, $paths));

defined('APPLICATION_PATH')
    or define('APPLICATION_PATH', realpath(dirname(__FILE__) .
'/../application'));
defined('APPLICATION_ENV')
    or define('APPLICATION_ENV', 'development');

require_once 'Zend/Application.php';

$application = new Zend_Application(APPLICATION_ENV, array(
    'bootstrap' => APPLICATION_PATH . '/bootstrap/Bootstrap.php',
    'autoloadernamespaces' => array('Zend', 'SF'),
    'resources' => array(
        'frontcontroller' => array(
            'moduledirectory' => APPLICATION_PATH . '/modules',
            'defaultmodule' => 'default',
        ),
        'modules' => array(),
    ),
    'phpsettings' => array(
            'display_errors' => true,
            'error_reporting' => E_ALL|E_STRICT,
            'date.timezone' =>  'Europe/London',
        )
    )
);
$application->bootstrap();
$application->run();

unset($application);

module bootstrap:

class Storefront_Bootstrap extends Zend_Application_Module_Bootstrap
{
    public function _initModule()
    {
        $this->getResourceLoader()
               ->addResourceType(
                    'modelResource',
                    'models/resources',
                    'Resource'
               );
         $this->getResourceLoader()
               ->addResourceType(
                    'service',
                    'services',
                    'Service'
               );
    }

    public function run(){}
}


-- 
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------

Reply via email to