116 lines
2.3 KiB
PHP
116 lines
2.3 KiB
PHP
|
<?php namespace Illuminate\Contracts\Routing;
|
||
|
|
||
|
use Closure;
|
||
|
|
||
|
interface Registrar {
|
||
|
|
||
|
/**
|
||
|
* Register a new GET route with the router.
|
||
|
*
|
||
|
* @param string $uri
|
||
|
* @param \Closure|array|string $action
|
||
|
* @return void
|
||
|
*/
|
||
|
public function get($uri, $action);
|
||
|
|
||
|
/**
|
||
|
* Register a new POST route with the router.
|
||
|
*
|
||
|
* @param string $uri
|
||
|
* @param \Closure|array|string $action
|
||
|
* @return void
|
||
|
*/
|
||
|
public function post($uri, $action);
|
||
|
|
||
|
/**
|
||
|
* Register a new PUT route with the router.
|
||
|
*
|
||
|
* @param string $uri
|
||
|
* @param \Closure|array|string $action
|
||
|
* @return void
|
||
|
*/
|
||
|
public function put($uri, $action);
|
||
|
|
||
|
/**
|
||
|
* Register a new DELETE route with the router.
|
||
|
*
|
||
|
* @param string $uri
|
||
|
* @param \Closure|array|string $action
|
||
|
* @return void
|
||
|
*/
|
||
|
public function delete($uri, $action);
|
||
|
|
||
|
/**
|
||
|
* Register a new PATCH route with the router.
|
||
|
*
|
||
|
* @param string $uri
|
||
|
* @param \Closure|array|string $action
|
||
|
* @return void
|
||
|
*/
|
||
|
public function patch($uri, $action);
|
||
|
|
||
|
/**
|
||
|
* Register a new OPTIONS route with the router.
|
||
|
*
|
||
|
* @param string $uri
|
||
|
* @param \Closure|array|string $action
|
||
|
* @return void
|
||
|
*/
|
||
|
public function options($uri, $action);
|
||
|
|
||
|
/**
|
||
|
* Register a new route with the given verbs.
|
||
|
*
|
||
|
* @param array|string $methods
|
||
|
* @param string $uri
|
||
|
* @param \Closure|array|string $action
|
||
|
* @return void
|
||
|
*/
|
||
|
public function match($methods, $uri, $action);
|
||
|
|
||
|
/**
|
||
|
* Route a resource to a controller.
|
||
|
*
|
||
|
* @param string $name
|
||
|
* @param string $controller
|
||
|
* @param array $options
|
||
|
* @return void
|
||
|
*/
|
||
|
public function resource($name, $controller, array $options = array());
|
||
|
|
||
|
/**
|
||
|
* Create a route group with shared attributes.
|
||
|
*
|
||
|
* @param array $attributes
|
||
|
* @param \Closure $callback
|
||
|
* @return void
|
||
|
*/
|
||
|
public function group(array $attributes, Closure $callback);
|
||
|
|
||
|
/**
|
||
|
* Register a new "before" filter with the router.
|
||
|
*
|
||
|
* @param string|callable $callback
|
||
|
* @return void
|
||
|
*/
|
||
|
public function before($callback);
|
||
|
|
||
|
/**
|
||
|
* Register a new "after" filter with the router.
|
||
|
*
|
||
|
* @param string|callable $callback
|
||
|
* @return void
|
||
|
*/
|
||
|
public function after($callback);
|
||
|
|
||
|
/**
|
||
|
* Register a new filter with the router.
|
||
|
*
|
||
|
* @param string $name
|
||
|
* @param string|callable $callback
|
||
|
* @return void
|
||
|
*/
|
||
|
public function filter($name, $callback);
|
||
|
|
||
|
}
|