Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/06/2010, 10:23
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Funcionamiento Zend_Route

Ah pues entonces lo puedes hacer así:
Código PHP:
Ver original
  1. $fc=Zend_Controller_Front::getInstance();
  2.         $fc->registerPlugin(new Plugin_AccessCheck($auth));
  3.        
  4.         $router=$fc->getRouter();
  5.         $router->addRoute(
  6.             'cruiseAroute',
  7.             new Zend_Controller_Router_Route(
  8.                 '/crucerosA/:action/*',
  9.                 array(
  10.                     'module'     => 'home',
  11.                     'controller' => 'cruceros',
  12.                     'type'       => 'A',
  13.                     'action'     => 'index'
  14.                 )
  15.             )
  16.         );
  17.         $router->addRoute(
  18.             'cruiseBroute',
  19.             new Zend_Controller_Router_Route(
  20.                 '/crucerosB/:action/*',
  21.                 array(
  22.                     'module'     => 'home',
  23.                     'controller' => 'cruceros',
  24.                     'type'       => 'B',
  25.                     'action'     => 'index'
  26.                 )
  27.             )
  28.         );

Al específicar :action va a cachar todas las acciones y enviarlas al controller cruceros, y al dejar un "default" en los parámetros te permite que tu ruta trabaje con /crucerosA o /crucerosB y que estos se vayan al index.

Saludos.