Uso di Zend_Route Regex con Zend_Config

Un piccolo snipplet:
in bootstrap.php

   /**
    * Inizializzazione dei routes
    *
    */
    protected function _initRoutes(){
        $this->_logger->info('Bootstrap ' . __METHOD__);
        $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/routes.ini', 'production');
        $router = $this->getResource('frontController')->getRouter();
        $router->addConfig($config, 'routes');
    }

In routes.ini

[production]
routes.circolari.type = "Zend_Controller_Router_Route_Regex"
routes.circolari.route = "circolari/(.*)"
routes.circolari.defaults.controller = circolari
routes.circolari.defaults.action = index
routes.circolari.map.titololink = 1
routes.circolari.reverse = "/circolari/%s";
Condividi:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • email
  • Google Bookmarks
  • LinkedIn
  • PDF
  • Reddit

Related posts:

  1. Modificare la route predefinita in Zend Framework 1.9x
  2. Alcune note sul bootstrapping dei moduli sotto ZF
  3. Ritrovare l’istanza di Front Controller (e router)
  4. Utilizzare smtp di Gmail con Zend_Mail
Nessun commento ancora

Lascia un commento

XHTML: Puoi usare questi tag: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word