1 | <?php |
||
13 | class HookRegistry { |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private $handlers = array(); |
||
19 | |||
20 | /** |
||
21 | * @since 1.0 |
||
22 | * |
||
23 | * @param array $configuration |
||
24 | */ |
||
25 | 2 | public function __construct( $configuration = array () ) { |
|
28 | |||
29 | /** |
||
30 | * @since 1.0 |
||
31 | */ |
||
32 | 1 | public function register() { |
|
37 | |||
38 | /** |
||
39 | * @since 1.0 |
||
40 | */ |
||
41 | 1 | public function deregister() { |
|
42 | 1 | foreach ( array_keys( $this->handlers ) as $name ) { |
|
43 | 1 | Hooks::clear( $name ); |
|
44 | 1 | } |
|
45 | 1 | } |
|
46 | |||
47 | /** |
||
48 | * @since 1.0 |
||
49 | * |
||
50 | * @param string $name |
||
51 | * |
||
52 | * @return Callable|false |
||
53 | */ |
||
54 | 1 | public function getHandlerFor( $name ) { |
|
57 | |||
58 | /** |
||
59 | * @since 1.0 |
||
60 | * |
||
61 | * @param string $name |
||
62 | * |
||
63 | * @return boolean |
||
64 | */ |
||
65 | 1 | public function isRegistered( $name ) { |
|
68 | |||
69 | 2 | private function registerCallbackHandlers( $configuration ) { |
|
98 | |||
99 | } |
||
100 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.