PHP Class Bolt\Controller\ConfigurableBase

Author: Carson Full ([email protected])
Inheritance: extends Base
Show file Open project: bolt/bolt Class Usage Examples

Public Methods

Method Description
after ( Request $request, Response $response )
before ( Request $request )
connect ( Silex\Application $app )

Protected Methods

Method Description
addRoute ( Silex\ControllerCollection $ctr, $name, array $config )
addRoutes ( Silex\ControllerCollection $c )
getConfigurationRoutes ( ) : array Return routes (as arrays) that will be converted to route objects.
resolveAfter ( array | string | null $after ) : Closure Returns a closure that will resolve the middleware callback to call on kernel response and call it.
resolveBefore ( array | string | null $before ) : Closure Returns a closure that will resolve the middleware callback to call on kernel request and call it.
resolveMiddleware ( array | string | null $callback ) : Closure Returns a closure that will resolve the class to use in middleware callback if one isn't specified

Method Details

addRoute() protected method

protected addRoute ( Silex\ControllerCollection $ctr, $name, array $config )
$ctr Silex\ControllerCollection
$config array

addRoutes() protected method

protected addRoutes ( Silex\ControllerCollection $c )
$c Silex\ControllerCollection

after() public method

public after ( Request $request, Response $response )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response

before() public method

public before ( Request $request )
$request Symfony\Component\HttpFoundation\Request

connect() public method

public connect ( Silex\Application $app )
$app Silex\Application

getConfigurationRoutes() abstract protected method

Return routes (as arrays) that will be converted to route objects.
abstract protected getConfigurationRoutes ( ) : array
return array

resolveAfter() protected method

Returns a closure that will resolve the middleware callback to call on kernel response and call it.
protected resolveAfter ( array | string | null $after ) : Closure
$after array | string | null
return Closure

resolveBefore() protected method

Returns a closure that will resolve the middleware callback to call on kernel request and call it.
protected resolveBefore ( array | string | null $before ) : Closure
$before array | string | null
return Closure

resolveMiddleware() protected method

Returns a closure that will resolve the class to use in middleware callback if one isn't specified
protected resolveMiddleware ( array | string | null $callback ) : Closure
$callback array | string | null
return Closure Invoke to get middleware callback