Ouzo\Routing\Route::allowAll PHP Method

allowAll() public static method

public static allowAll ( $uri, $controller, $options = [] )
    public static function allowAll($uri, $controller, $options = array())
    {
        self::addRoute(self::$methods, $uri, $controller, false, $options);
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function shouldExceptActionInAllAllow()
 {
     //given
     Route::allowAll('/sample', 'sample', array('except' => array('except')));
     //when
     try {
         $this->get('/sample/except');
         $this->fail();
     } catch (RouterException $e) {
         //then
         $this->assertEquals('No route rule found for HTTP method [GET] and URI [/sample/except]', $e->getMessage());
     }
 }
All Usage Examples Of Ouzo\Routing\Route::allowAll