UnionOfRAD / lithium

li₃ is the fast, flexible and most RAD development framework for PHP
http://li3.me
BSD 3-Clause "New" or "Revised" License
1.22k stars 238 forks source link

Route regexp definition #222

Closed lukassivak closed 12 years ago

lukassivak commented 12 years ago

If i have my own localized router for example

class Localized extends \lithium\net\http\Route {

    protected function _init() {

       $this->_config['template']  = '/{:locale:[a-z]{2,3}}' . $this->_config['template'];

        parent::_init();
    }

}

all is great, but when i change this regexp to:

     $this->_config['template']  = '/{:locale:[a-z]+}' . $this->_config['template'];

route can not be found.

This problem only occurs in actual commit, in version 1.0 works all fine.

daschl commented 12 years ago

Is there a specific reason why you want to subclass the route class instead of using route continuations?

Also, please include your routes.php and some example routes so that we can reproduce it. Thanks!

nateabele commented 12 years ago

Also, try using the li3 route command to test your route-matching.

daschl commented 12 years ago

I close this issue since not more information was provided and this looks like a non-issue to me.

@lukassivak I'd recommend you to look at the built in locale and route continuation stuff. If you still think there is a problem please reopen this issue with further details or ideally a test case to reproduce! Thanks!