views:

156

answers:

0

The router

$router->addRoute('catalogue', new Zend_Controller_Router_Route_Regex('(?:(uk|en)/)?catalogue/(.+)',
    array(
        'language'   => 'uk',
        'module'     => 'default',
        'controller' => 'index',
        'action'     => 'catalogue'
    ),
    array(1 => 'language', 2 => 'param'),
    '%scatalogue/%s'
));

When first parameter is missed throws error

URL: /catalogue/my

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3279060 bytes) in /Applications/MAMP/htdocs/Fitogor/library/Zend/Controller/Response/Abstract.php on line 368

In zend framework 1.7 all was good.

And how to create url through url hepler?

$this->url(array('language' => 'en', 'param' => 'my'), 'catalogue);

return /encatalogue/my

if change reverse to %s/catalogue/%s

$this->url(array('language' => '', 'param' => 'my'), 'catalogue);

return url with double slash //catalogue/my