Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2010, 15:55
turbex
 
Fecha de Ingreso: enero-2008
Mensajes: 115
Antigüedad: 16 años, 3 meses
Puntos: 1
problema con autoloader en Zend

Hola amigos, tengo un problema con el autoloader en Zend
mi estructura de directorios es la siguiente:

Código PHP:
.. | application
....... | admin
............ | controllers
............ | forms
............ | views
....... | models
....... | public
............ | 
controllers
............ | forms
............ | views
.. | library
....... | Base
....... | Zend 
Y mi Bootstrap.php es el siguiente:
Código PHP:
<?php
    
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
    
{
        protected function 
_initAutoload()
        {
            
$this->bootstrap('frontController');
            
$this->_front $this->getResource('frontController');
            
            
$autoLoader = new Zend_Loader_Autoloader_Resource(array(
                
'basePath'                => APPLICATION_PATH,
                
'namespace'                => '',
                
'resourceTypes'        => array(
                    
'form'        => array(
                        
'path'                => 'admin/forms/',
                        
'namespace'        => 'Admin_Form_',
                    ),
                    
'model'        => array(
                        
'path'                => 'models/',
                        
'namespace'        => 'Model_'
                    
)
                )
            ));
            
            return 
$autoLoader;
        }

                
/* EXISTEN OTROS METODOS PARA CONFIG DE BASE DE DATOS, LOCALE, CACHE, PERO LOS VOY A OMITIR */

        
protected function _initControllers()
        {
            
$this->_front->addControllerDirectory(APPLICATION_PATH '/admin/controllers''admin');
            
$this->_front->addControllerDirectory(APPLICATION_PATH '/public/controllers''public');
        }
Mi application.ini
Código PHP:
[production]
;
PHP Settings
phpSettings
.display_startup_errors 0
phpSettings
.display_errors 0
phpSettings
.error_reporting 8191

;Include paths
;includePaths.library BASE_PATH "/library"

;Bootstrap
bootstrap
.path APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

;Resources
resources
.frontController.env APPLICATION_ENV
resources
.frontController.throwExceptions false
resources
.frontController.defaultModule "public"
resources.frontController.defaultControllerName "index"
resources.frontController.defaultAction "index"
resources.frontController.plugins.init "Base_Controller_Plugin_Initializer"
resources.frontController.plugins.auth "Base_Controller_Plugin_Auth"

;Autoloader
autoloaderNamespaces.0 
"Base_";
autoloaderNamespaces.1 "Kohana_";

[
staging production]

[
testing production]
phpSettings.display_startup_errors 1
phpSettings
.display_errors 1

resources
.frontController.throwExceptions true

[development production]
phpSettings.display_startup_errors 1
phpSettings
.display_errors 1
resources
.frontController.params.displayExceptions 1
resources
.frontController.throwExceptions true 
Bueno tengo varios formularios dentro del modulo "admin", cuando los invoco lo hago haciendo "Admin_Form_Usuarios" por ejemplo... todo bien....

el problema es cuando se hace en el modulo "public" he creado un formulario y lo intento llamar con "Public_Form_Busqueda" o "Form_Busqueda" pero no funciona...
debo agregar algo más a mi bootstrap... o a mi application.ini ??

espero puedan ayudarme... gracias.