Me again, I don't get it, I tried to extend the addDefaults() method :
public function addDefaultRoutes()
{
if (!$this->hasRoute('default')) {
$dispatcher = $this->getFrontController()->getDispatcher();
$request = $this->getFrontController()->getRequest();
require_once 'Zend/Controller/Router/Route/Module.php';
$compat = new Zend_Controller_Router_Route_Module(array(),
$dispatcher, $request);
$this->_localeRoute = new Zend_Controller_Router_Route(
':locale',
array(),
array('locale' => '^([a-z]{2}-[a-z]{2})$')
);
$compat = $this->_localeRoute->chain($compat);
$this->_routes = array_merge(array('default' => $compat),
$this->_routes);
$this->addRoute('locale', $this->_localeRoute);
}
return $this;
}
I'm definitly missing something, i don't understand how the Router_Module
works. What i want to do, is it even possible ? :)
br,
Benjamin.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Need-some-explanation-on-Router-Rewrite-tp2966450p2969494.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论