ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Routable.php
Go to the documentation of this file.
1<?php
9namespace Slim;
10
12
19abstract class Routable
20{
21 use CallableResolverAwareTrait;
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}
An exception for terminatinating execution or to throw for unit testing.
add($callable)
Prepend middleware to the middleware collection.
Definition: Routable.php:91
setPattern($newPattern)
Set the route pattern.
Definition: Routable.php:102
setContainer(ContainerInterface $container)
Set container for use with resolveCallable.
Definition: Routable.php:78
getPattern()
Get the route pattern.
Definition: Routable.php:66
getMiddleware()
Get the middleware registered for the group.
Definition: Routable.php:56
Describes the interface of a container that exposes methods to read its entries.
Describes the interface of a container that exposes methods to read its entries.
Slim Framework (https://slimframework.com)
Definition: App.php:9
$container
Definition: wac.php:13