ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Slim\RouteGroup Class Reference
+ Inheritance diagram for Slim\RouteGroup:
+ Collaboration diagram for Slim\RouteGroup:

Public Member Functions

 __construct ($pattern, $callable)
 Create a new RouteGroup. More...
 
 __invoke (App $app=null)
 Invoke the group to register any Routable objects within it. More...
 
- Public Member Functions inherited from Slim\Routable
 getMiddleware ()
 Get the middleware registered for the group. More...
 
 getPattern ()
 Get the route pattern. More...
 
 setContainer (ContainerInterface $container)
 Set container for use with resolveCallable. More...
 
 add ($callable)
 Prepend middleware to the middleware collection. More...
 
 setPattern ($newPattern)
 Set the route pattern. More...
 
- Public Member Functions inherited from Slim\Interfaces\RouteGroupInterface
 getPattern ()
 Get route pattern. More...
 
 add ($callable)
 Prepend middleware to the group middleware collection. More...
 

Additional Inherited Members

- Protected Attributes inherited from Slim\Routable
 $callable
 
 $container
 
 $middleware = []
 
 $pattern
 

Detailed Description

Definition at line 19 of file RouteGroup.php.

Constructor & Destructor Documentation

◆ __construct()

Slim\RouteGroup::__construct (   $pattern,
  $callable 
)

Create a new RouteGroup.

Parameters
string$patternThe pattern prefix for the group
callable$callableThe group callable

Definition at line 27 of file RouteGroup.php.

28  {
29  $this->pattern = $pattern;
30  $this->callable = $callable;
31  }

Member Function Documentation

◆ __invoke()

Slim\RouteGroup::__invoke ( App  $app = null)

Invoke the group to register any Routable objects within it.

Parameters
App$appThe App instance to bind/pass to the group callable

Implements Slim\Interfaces\RouteGroupInterface.

Definition at line 38 of file RouteGroup.php.

39  {
40  $callable = $this->resolveCallable($this->callable);
41  if ($callable instanceof Closure && $app !== null) {
42  $callable = $callable->bindTo($app);
43  }
44 
45  $callable($app);
46  }

The documentation for this class was generated from the following file: