12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- abstract class HookObserver implements HookObserverInterface
- {
- public $path;
- public $pluginName;
-
- protected function __construct($path, $pluginName)
- {
- $this->path = $path;
- $this->pluginName = $pluginName;
- }
-
- public static function create()
- {
- static $result = null;
- if ($result) {
- return $result;
- } else {
- try {
- $class = get_called_class();
- return new $class;
- } catch (Exception $e) {
- return null;
- }
- }
- }
-
- public function getPath()
- {
- return $this->path;
- }
-
- public function getPluginName()
- {
- return $this->pluginName;
- }
- }
|