Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/10/2011, 11:39
pixel1
 
Fecha de Ingreso: julio-2008
Ubicación: México
Mensajes: 150
Antigüedad: 15 años, 9 meses
Puntos: 4
Modulos en zend frame work

Hola a todos escribo para plantear lo siguiente:

Estoy iniciandome en el framework de Zend y quieor desarrollar mi primer aplicacion dividida en un frontend y un backend; he leido la documentacion oficial el tema del Front_Controller y el tema Using a Conventional Modular Directory Structure sin embargo no logro entender bien como es esto.

Tengo la siguiente estructura de archivos:

Y en el index tengo lo siguiente:
Código PHP:
// Define path to application directory
defined('APPLICATION_PATH')
    || 
define('APPLICATION_PATH'realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || 
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    
realpath(APPLICATION_PATH '/../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'
);

$front Zend_Controller_Front::getInstance();

$front->setControllerDirectory(array(
    
'default' => '../application/modulos/frontend/controllers',
    
'backend'    => '../application/modulos/backend/controllers'
));

$application->bootstrap()
            ->
run(); 
Segun yo al establecer dos directorios de controladores ya debería funcionar algo como esto:

myurl.com/backend

En donde se leeria el IndexController de la carpeta backend.


Saludos y gracias.
__________________
Blog blog.desarrollandoideas.com

Twitter
Sígueme en Twitter