PHP Interface ManaPHP\Mvc\Router\GroupInterface

Datei anzeigen Open project: manaphp/manaphp

Public Methods

Method Description
add ( string $pattern, string | array $paths = null, string $httpMethod = null ) : ManaPHP\Mvc\Router\RouteInterface Adds a route to the router on any HTTP method
addDelete ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface Adds a route to the router that only match if the HTTP method is DELETE
addGet ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface Adds a route to the router that only match if the HTTP method is GET
addHead ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface Adds a route to the router that only match if the HTTP method is HEAD
addOptions ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface Add a route to the router that only match if the HTTP method is OPTIONS
addPatch ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface Adds a route to the router that only match if the HTTP method is PATCH
addPost ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface Adds a route to the router that only match if the HTTP method is POST
addPut ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface Adds a route to the router that only match if the HTTP method is PUT
match ( string $uri ) : false | array

Method Details

add() public method

router->add('/about', 'About::index');
public add ( string $pattern, string | array $paths = null, string $httpMethod = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
$httpMethod string
return ManaPHP\Mvc\Router\RouteInterface

addDelete() public method

Adds a route to the router that only match if the HTTP method is DELETE
public addDelete ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
return ManaPHP\Mvc\Router\RouteInterface

addGet() public method

Adds a route to the router that only match if the HTTP method is GET
public addGet ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
return ManaPHP\Mvc\Router\RouteInterface

addHead() public method

Adds a route to the router that only match if the HTTP method is HEAD
public addHead ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
return ManaPHP\Mvc\Router\RouteInterface

addOptions() public method

Add a route to the router that only match if the HTTP method is OPTIONS
public addOptions ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
return ManaPHP\Mvc\Router\RouteInterface

addPatch() public method

Adds a route to the router that only match if the HTTP method is PATCH
public addPatch ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
return ManaPHP\Mvc\Router\RouteInterface

addPost() public method

Adds a route to the router that only match if the HTTP method is POST
public addPost ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
return ManaPHP\Mvc\Router\RouteInterface

addPut() public method

Adds a route to the router that only match if the HTTP method is PUT
public addPut ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface
$pattern string
$paths string | array
return ManaPHP\Mvc\Router\RouteInterface

match() public method

public match ( string $uri ) : false | array
$uri string
return false | array