0
votes

i need something like this:

Route::set('page', '(<pagename>/)(<controller>/)(<action>)', array('controller' => '[a-zA-Z]+', 'action' => '[a-zA-Z]+'))->defaults(array(
    'controller' => URL::$section['<pagename>']['controller'],
    'action' => 'index',
));

I need this because i'm using cyrillic urls. I can redirect actions inside controller (by $this->request->action(URL::$section['<pagename>']['action'])), but can't choose controller by string from this option 'controller' => URL::$section['<pagename>']['controller']

1

1 Answers

0
votes

http://kohanaframework.org/3.2/guide/kohana/routing#lambdacallback-route-logic? You can use lambda functions (PHP5.3+) or standard callbacks (PHP<5.3) for parsing. Dont forget to return array with routing params (controller, action etc).