Routing in Zend'e?

Good time of day.

Prompt, knowledgeable people, is it possible (and if so, how?) to organize Zend'e routing like this: - displays a list of blog topics - displays a list of blogs relevant section - displays written blog

Googled a couple of hours, adequate and explanatory information was not found. With Zend'om work recently, therefore, stalled.

Thanks for any help :)
October 3rd 19 at 03:25
3 answers
October 3rd 19 at 03:27
Not seen zend, but here is the Google:
$route1 = new Zend_Controller_Router_Route_Regex(
 ‘action’ => 'ololo',
 ’controller’ => 'lololo',
 ‘module’ => 'default'),
 array(1 => 'id'));
$route2 = new Zend_Controller_Router_Route_Regex(
 ‘action’ => 'lolo',
 ’controller’ => 'olol',
 ‘module’ => 'default'),
 array(1 => 'id'));
$route3 = new Zend_Controller_Router_Route_Regex(
 ‘action’ => 'lolo',
 ’controller’ => 'olol',
 ‘module’ => 'default'),

The latter is possible without regex of course, but too lazy to look for more.
And the number then get so $this->getRequest->getParam('id')
And maybe with the slashes I made a mistake in the regular season.
October 3rd 19 at 03:29
Yes, it's possible to implement this using of the regular season, but there are differences in the implementation of the routing zf1 and zf2
October 3rd 19 at 03:31

And it is possible still so: 1. Instigate the Bootstrap router in-e:

protected function _initRouter()
 $fc = Zend_Controller_Front::getInstance();
 $router = $fc->getRouter();
 $routerConfig = new Zend_Config_Ini('/../applications/configs/routes.ini');
 $router->addConfig($routerConfig, 'routes'); 
2. In routes.ini prescribe dynamic router: = "Zend_Controller_Router_Route" = "blog/:id" = "default" = "blog" = "index"
3. Taken in the appropriate controller, 'id': $this->getRequest->getParam('id')

Find more questions by tags PHPZend Framework