ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Slim\DeferredCallable Class Reference
+ Collaboration diagram for Slim\DeferredCallable:

Public Member Functions

 __construct ($callable, ContainerInterface $container=null)
 DeferredMiddleware constructor. More...
 
 __invoke ()
 

Private Attributes

 $callable
 
 $container
 

Detailed Description

Definition at line 15 of file DeferredCallable.php.

Constructor & Destructor Documentation

◆ __construct()

Slim\DeferredCallable::__construct (   $callable,
ContainerInterface  $container = null 
)

DeferredMiddleware constructor.

Parameters
callable | string$callable
ContainerInterface$container

Definition at line 28 of file DeferredCallable.php.

References $container.

29  {
30  $this->callable = $callable;
31  $this->container = $container;
32  }

Member Function Documentation

◆ __invoke()

Slim\DeferredCallable::__invoke ( )

Definition at line 34 of file DeferredCallable.php.

35  {
36  $callable = $this->resolveCallable($this->callable);
37  if ($callable instanceof Closure) {
38  $callable = $callable->bindTo($this->container);
39  }
40 
41  $args = func_get_args();
42 
43  return call_user_func_array($callable, $args);
44  }

Field Documentation

◆ $callable

Slim\DeferredCallable::$callable
private

Definition at line 19 of file DeferredCallable.php.

◆ $container

Slim\DeferredCallable::$container
private

Definition at line 21 of file DeferredCallable.php.


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