zend-controller-router

Zend_Controller_Router_Route

我们两清 提交于 2019-12-23 23:51:52
问题 I'm trying to make a Router that can respond to this structure: module/controller/action/id and module/controller/action/page The only difference is is 'id' or 'page'. I'm using this code: $routeAdmin = new Zend_Controller_Router_Route( 'administrador/:controller/:action/:id/:pg', array( 'module' => 'administrador', 'controller' => 'index', 'action' => 'index', 'id' => 0, 'pg' => 1 ), array( 'id' => '\d+', 'pg' => '\d+' ) ); $router->addRoute('administrador', $routeAdmin); The problem is that

Zend_Controller_Router_Route: Could not find a translator

一世执手 提交于 2019-12-14 02:06:02
问题 I am developing a multilanguage application. In the bootstrap there is the routes setup: protected function _initRoutes() { $this->bootstrap('frontController'); $router = $this->frontController->getRouter(); // PAGES ROUTE $page = new Zend_Controller_Router_Route( ':language/:ident', array( 'module' => 'core', 'controller' => 'pagine', 'action' => 'view' ), array( 'ident' => '[a-zA-Z-_0-9]{3,}', 'language' => '[a-z]{2}' ) ); $registrazione = new Zend_Controller_Router_Route( ':language/

Zend translate URL and language switcher

安稳与你 提交于 2019-12-13 04:42:48
问题 I have managed to make my URL i18n compliant using Zend_Controller_Router . Ie: en/user/login becomes fr/utilisateur/connexion and both URLs go to the same controller / action . The problem I am facing is the following I have a language switcher that is displayed as follow : Français English Italiano etc. The currently active language doesn't have an anchor tag, but all others do. For the languages that have an anchor on them I am building the URL and I want them to be translated in their

How do I write chains of chains of … of route in a ini file for the Zend framework?

微笑、不失礼 提交于 2019-12-04 14:38:31
问题 I am trying to define routes as below with an INI file for the Zend Framework: http://api.example.com/servicename/{version}/users/:userid/items/:itemid routes.host.type = "Zend_Controller_Router_Route_Hostname" routes.host.route = "api.example.com" routes.host.chains.api.type = "Zend_Controller_Router_Route_Static" routes.host.chains.api.route = "servicename/v1" routes.host.chains.api.defaults.controller = "servicename-v1-api" routes.host.chains.api.defaults.action = "index" routes.host

How do I write chains of chains of … of route in a ini file for the Zend framework?

余生长醉 提交于 2019-12-03 08:31:52
I am trying to define routes as below with an INI file for the Zend Framework: http://api.example.com/servicename/ {version}/users/:userid/items/:itemid routes.host.type = "Zend_Controller_Router_Route_Hostname" routes.host.route = "api.example.com" routes.host.chains.api.type = "Zend_Controller_Router_Route_Static" routes.host.chains.api.route = "servicename/v1" routes.host.chains.api.defaults.controller = "servicename-v1-api" routes.host.chains.api.defaults.action = "index" routes.host.chains.api.chains.users.chains.user.type = "Zend_Controller_Router_Static" routes.host.chains.api.chains