PHP Class RKA\Slim

Inheritance: extends Slim\Slim
Afficher le fichier Open project: akrabat/rka-slim-controller Class Usage Examples

Méthodes publiques

Méthode Description
mapRoute ( $args ) : Slim\Route Add a route as per the parent method, additionally supporting the syntax "{controller class name}:{action method name}" as the last argument which will be converted to a closure that instantiates the controller (or gets from container) and then calls the method on it.

Méthodes protégées

Méthode Description
createControllerClosure ( string $name ) : closure Create a closure that instantiates (or gets from container) and then calls the action method.

Method Details

createControllerClosure() protected méthode

Also if the methods exist on the controller class, call setApp(), setRequest() and setResponse() passing in the appropriate object.
protected createControllerClosure ( string $name ) : closure
$name string controller class name and action method name separated by a colon
Résultat closure

mapRoute() public méthode

Add a route as per the parent method, additionally supporting the syntax "{controller class name}:{action method name}" as the last argument which will be converted to a closure that instantiates the controller (or gets from container) and then calls the method on it.
public mapRoute ( $args ) : Slim\Route
Résultat Slim\Route