コード例 #1
0
 public function testExecuteRouteWithArgs()
 {
     $router = new Nether\Avenue\Router();
     $handler = new Nether\Avenue\RouteHandler(static::$RequestData['Test']);
     $handler->SetArgv(['Patrick Stewart']);
     ob_start();
     $handler->Run($router);
     (new Verify('check for specific output', ob_get_clean()))->equals('Patrick Stewart');
     return;
 }
コード例 #2
0
ファイル: Router.php プロジェクト: netherphp/avenue
 public function WillHandlerAcceptRequest(Nether\Avenue\RouteHandler $h)
 {
     /*//
     	return(bool)
     	//*/
     $class = $h->GetClass();
     // if the handler class does not have the query method then assume
     // that it will handle it.
     if (!method_exists($class, 'WillHandleRequest')) {
         return true;
     }
     return call_user_func_array([$class, 'WillHandleRequest'], [$this, $h]);
 }