ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Routable.php
Go to the documentation of this file.
1 <?php
9 namespace Slim;
10 
12 
19 abstract class Routable
20 {
22 
28  protected $callable;
29 
35  protected $container;
36 
42  protected $middleware = [];
43 
49  protected $pattern;
50 
56  public function getMiddleware()
57  {
58  return $this->middleware;
59  }
60 
66  public function getPattern()
67  {
68  return $this->pattern;
69  }
70 
79  {
80  $this->container = $container;
81  return $this;
82  }
83 
91  public function add($callable)
92  {
93  $this->middleware[] = new DeferredCallable($callable, $this->container);
94  return $this;
95  }
96 
102  public function setPattern($newPattern)
103  {
104  $this->pattern = $newPattern;
105  }
106 }
add($callable)
Prepend middleware to the middleware collection.
Definition: Routable.php:91
$container
Definition: wac.php:13
Describes the interface of a container that exposes methods to read its entries.
getPattern()
Get the route pattern.
Definition: Routable.php:66
setContainer(ContainerInterface $container)
Set container for use with resolveCallable.
Definition: Routable.php:78
getMiddleware()
Get the middleware registered for the group.
Definition: Routable.php:56
Slim Framework (https://slimframework.com)
Definition: App.php:9
setPattern($newPattern)
Set the route pattern.
Definition: Routable.php:102