1 | <?php |
||
19 | abstract class AbstractPlugin implements EventObserverInterface |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * @var string plugin attributes |
||
24 | */ |
||
25 | private $plugin = []; |
||
26 | |||
27 | /** |
||
28 | * @var array subscribed Phile events ['eventName' => 'classMethodToCall'] |
||
29 | */ |
||
30 | protected $events = []; |
||
31 | |||
32 | /** |
||
33 | * @var array the plugin settings |
||
34 | */ |
||
35 | protected $settings = []; |
||
36 | |||
37 | /** |
||
38 | * initialize plugin |
||
39 | * |
||
40 | * try to keep all initialization in one method to have a clean class |
||
41 | * for the plugin-user |
||
42 | * |
||
43 | * @param string $pluginKey |
||
44 | * @deprecated since 1.5.1 will be declared 'final' |
||
45 | */ |
||
46 | 31 | public function initializePlugin($pluginKey) |
|
89 | |||
90 | /** |
||
91 | * inject settings |
||
92 | * |
||
93 | * backwards compatibility to Phile 1.4 |
||
94 | * |
||
95 | * @param array $settings |
||
96 | * @deprecated since 1.5.1 will be removed |
||
97 | */ |
||
98 | 31 | public function injectSettings(array $settings = null) |
|
101 | |||
102 | /** |
||
103 | * implements EventObserverInterface |
||
104 | * |
||
105 | * @param string $eventKey |
||
106 | * @param null $data |
||
107 | * @return void |
||
108 | */ |
||
109 | 28 | public function on($eventKey, $data = null) |
|
124 | |||
125 | /** |
||
126 | * get file path to plugin root (trailing slash) or to a sub-item |
||
127 | * |
||
128 | * @param string $subPath |
||
129 | * @return null|string null if item does not exist |
||
130 | */ |
||
131 | 31 | protected function getPluginPath($subPath = '') |
|
135 | } |
||
136 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.