123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?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;
- }
- }
|