Ouzo\Routing\Route::get PHP Method

get() public static method

public static get ( $uri, $action, array $options = [] )
$options array
    public static function get($uri, $action, array $options = array())
    {
        self::addRoute('GET', $uri, $action, true, $options);
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function shouldParseParameterWithSpace()
 {
     //given
     Route::get("/cabinets/:color/:order_id", "SummaryOrderedCorpuses#index");
     $router = $this->_createRouter('GET', '/cabinets/Biały 101/18');
     //when
     $rule = $router->findRoute();
     //then
     $parameters = $rule->getParameters();
     $this->assertEquals('Biały 101', $parameters['color']);
     $this->assertEquals('18', $parameters['order_id']);
 }
All Usage Examples Of Ouzo\Routing\Route::get