Exemplo n.º 1
0
 /**
  * Add routes for static content and any route added via {@link addRoute()} to the route chain
  *
  * @return $this
  */
 protected function registerRoutes()
 {
     $router = $this->app->getFrontController()->getRouter();
     // TODO: We should not be required to do this. Please check dispatch()
     $this->app->getfrontController()->addControllerDirectory($this->getControllerDir(), $this->getName());
     /** @var \Zend_Controller_Router_Rewrite $router */
     foreach ($this->routes as $name => $route) {
         $router->addRoute($name, $route);
     }
     $router->addRoute($this->name . '_jsprovider', new Zend_Controller_Router_Route('js/' . $this->name . '/:file', array('action' => 'javascript', 'controller' => 'static', 'module' => 'default', 'module_name' => $this->name)));
     $router->addRoute($this->name . '_img', new Zend_Controller_Router_Route_Regex('img/' . $this->name . '/(.+)', array('action' => 'img', 'controller' => 'static', 'module' => 'default', 'module_name' => $this->name), array(1 => 'file')));
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Register routes for web access
  *
  * @return self
  */
 protected function registerRoutes()
 {
     $this->app->getFrontController()->getRouter()->addRoute($this->name . '_jsprovider', new Route('js/' . $this->name . '/:file', array('controller' => 'static', 'action' => 'javascript', 'module_name' => $this->name)));
     $this->app->getFrontController()->getRouter()->addRoute($this->name . '_img', new Route('img/' . $this->name . '/:file', array('controller' => 'static', 'action' => 'img', 'module_name' => $this->name)));
     return $this;
 }
Exemplo n.º 3
0
 /**
  * Add routes for static content and any route added via {@link addRoute()} to the route chain
  *
  * @return $this
  */
 protected function registerRoutes()
 {
     $router = $this->app->getFrontController()->getRouter();
     /** @var \Zend_Controller_Router_Rewrite $router */
     foreach ($this->routes as $name => $route) {
         $router->addRoute($name, $route);
     }
     $router->addRoute($this->name . '_jsprovider', new Zend_Controller_Router_Route('js/' . $this->name . '/:file', array('action' => 'javascript', 'controller' => 'static', 'module' => 'default', 'module_name' => $this->name)));
     $router->addRoute($this->name . '_img', new Zend_Controller_Router_Route_Regex('img/' . $this->name . '/(.+)', array('action' => 'img', 'controller' => 'static', 'module' => 'default', 'module_name' => $this->name), array(1 => 'file')));
     return $this;
 }