1 | <?php |
||
10 | class RequestMatcherPlugin implements Plugin |
||
11 | { |
||
12 | const SERVICE_NAME = 'requestMatcher'; |
||
13 | |||
14 | /** |
||
15 | * Regex used to determine Action name |
||
16 | * |
||
17 | * @var null|string |
||
18 | */ |
||
19 | private $actionRegex; |
||
20 | |||
21 | /** |
||
22 | * Constructor |
||
23 | * |
||
24 | * @param string|null $actionRegex Regex used to determine Action name |
||
25 | * |
||
26 | * @return void |
||
|
|||
27 | */ |
||
28 | function __construct($actionRegex = null) |
||
32 | |||
33 | /** |
||
34 | * Apply Plugin's services to the existing Container |
||
35 | * |
||
36 | * @param Container $container App's Services Container |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | public function loadServices(Container $container) |
||
52 | |||
53 | /** |
||
54 | * Returns a list of Actions for this plugin |
||
55 | * |
||
56 | * @param Application $app The running Application |
||
57 | * |
||
58 | * @return void |
||
59 | */ |
||
60 | public function load(Application $app) |
||
64 | } |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.