PHP Class Ouzo\Routing\Route

Sample usage: Route::get('/agents/index', 'agents#index'); will match: GET /agents/index Route::post('/agents/save', 'agents#save'); will match: POST /agents/save Route::resource('agents'); will mapping RESTs methods (index, fresh, edit, show, create, update, destroy) Route::any('/agents/show_numbers', 'agents#show_numbers'); will match: POST or GET /agents/show_numbers Route::allowAll('/agents', 'agents'); will mapping any methods to all actions in controller To show all routes or routes per controller: Route::getRoutes(); Route::getRoutesForController('agents');
Inheritance: implements Ouzo\Routing\RouteInterface
Show file Open project: letsdrink/ouzo Class Usage Examples

Public Properties

Property Type Description
$isDebug
$methods
$validate

Public Methods

Method Description
allowAll ( $uri, $controller, $options = [] )
any ( $uri, $action, array $options = [] )
clear ( )
delete ( $uri, $action, array $options = [] )
get ( $uri, $action, array $options = [] )
getRoutes ( ) : RouteRule[]
getRoutesForController ( $controller )
group ( $name, $routeFunction )
post ( $uri, $action, array $options = [] )
put ( $uri, $action, array $options = [] )
resource ( $controller )

Private Methods

Method Description
addResourceRoute ( $controller, $method, $uriSuffix, $action )
addRoute ( $method, $uri, $action, $requireAction = true, $options = [], $isResource = false )
createRouteAction ( $controller, $action )
createRouteUri ( $action, $suffix = '' )
existRouteRule ( $methods, $uri )

Method Details

allowAll() public static method

public static allowAll ( $uri, $controller, $options = [] )

any() public static method

public static any ( $uri, $action, array $options = [] )
$options array

clear() public static method

public static clear ( )

delete() public static method

public static delete ( $uri, $action, array $options = [] )
$options array

get() public static method

public static get ( $uri, $action, array $options = [] )
$options array

getRoutes() public static method

public static getRoutes ( ) : RouteRule[]
return RouteRule[]

getRoutesForController() public static method

public static getRoutesForController ( $controller )

group() public static method

public static group ( $name, $routeFunction )

post() public static method

public static post ( $uri, $action, array $options = [] )
$options array

put() public static method

public static put ( $uri, $action, array $options = [] )
$options array

resource() public static method

public static resource ( $controller )

Property Details

$isDebug public static property

public static $isDebug

$methods public static property

public static $methods

$validate public static property

public static $validate