[PHP] Re: Yaf_Route

2011-11-30 Thread Eduárd Moldovan
Hello, That worked like a charm! Thx! I thought that the error reporting was on, sorry for that. edi 2011/11/30 Laruence > Hi: > Yaf_Router::addRoute is not a static method. > > you should do like: > > $dispatcher->getRouter()->addRoute("regex", $route); // > http://www.php.net/manua

[PHP] Re: Yaf_Route

2011-11-30 Thread Laruence
Hi: Yaf_Router::addRoute is not a static method. you should do like: $dispatcher->getRouter()->addRoute("regex", $route); // http://www.php.net/manual/en/yaf-dispatcher.getrouter.php btw: when you in development environ, it is useful to keep error_reporting on and look at error_

[PHP] Re: Yaf_Route

2011-11-30 Thread Eduárd Moldovan
Hey Laruence, I have tried the below example, but did not really get it work. My code looks like this: public function _initRoute(Yaf_Dispatcher $dispatcher) { $route = new Yaf_Route_Regex ( "#(.*)#", array( "controller" => "index",

[PHP] Re: Yaf_Route

2011-11-27 Thread Laruence
HI: Yaf designd a route statck to proviods the ability for extends route process. you can add new route into stack by calling Yaf_Router::addRoute(or addConfig), when a request coming , Yaf will call the top route in the stack at the first time, as pseudo codes like: while ($route