Добрый день. В Zend все файлы boorstrap в приложении работают для всего сайта. Мне нужно что бы для модуля работал только boorstrap в модуле. У меня есть модуль admin, который видит bootstrap соседнего модуля user и в итоге в admin не правильный роутинг. В файле Modules у меня есть функция, которая подключает boorstrap: Код (PHP): public function init() { $bootstraps = array(); $bootstrap = $this->getBootstrap(); $bootstrap->bootstrap('FrontController'); $front = $bootstrap->getResource('FrontController'); $modules = $front->getControllerDirectory(); $default = $front->getDefaultModule(); $curBootstrapClass = get_class($bootstrap); foreach ($modules as $module => $moduleDirectory) { $bootstrapClass = $this->_formatModuleName($module) . '_Bootstrap'; if (!class_exists($bootstrapClass, false)) { $bootstrapPath = dirname($moduleDirectory) . '/Bootstrap.php'; if (file_exists($bootstrapPath)) { $eMsgTpl = 'Bootstrap file found for module "%s" but bootstrap class "%s" not found'; include_once $bootstrapPath; if (($default != $module) && !class_exists($bootstrapClass, false) ) { throw new Zend_Application_Resource_Exception(sprintf( $eMsgTpl, $module, $bootstrapClass )); } elseif ($default == $module) { if (!class_exists($bootstrapClass, false)) { $bootstrapClass = 'Bootstrap'; if (!class_exists($bootstrapClass, false)) { throw new Zend_Application_Resource_Exception(sprintf( $eMsgTpl, $module, $bootstrapClass )); } } } } else { continue; } } if ($bootstrapClass == $curBootstrapClass) { // If the found bootstrap class matches the one calling this // resource, don't re-execute. continue; } $bootstraps[$module] = $bootstrapClass; } return $this->_bootstraps = $this->bootstrapBootstraps($bootstraps); } Добавлено спустя 1 минуту 32 секунды: Эта функция почему-то не работает правильно, помогите пожайлуста PHP, JavaScript, SQL и другой код пишите внутри тегов Код ( (Unknown Language)): [b]php][/b]Тут код[b][/[/b][b]code][/b][/color]