hasProxy example

if ($this instanceof Enlight_Singleton) {
            if (!isset(self::$instances[$class])) {
                self::$instances[$class] = $this;
            } else {
                throw new Enlight_Exception(
                    'Class "' . \get_class($this) . '" is singleton, please use the instance method'
                );
            }
        }
        if ($this instanceof Enlight_Hook
          && !$this instanceof Enlight_Hook_Proxy
          && Shopware()->Hooks()->hasProxy($class)
        ) {
            throw new Enlight_Exception(
                'Class "' . \get_class($this) . '" has hooks, please use the instance method'
            );
        }
        if (method_exists($this, 'init')) {
            if (\func_num_args()) {
                \call_user_func_array([$this, 'init'], \func_get_args());
            } else {
                $this->init();
            }
        }
Home | Imprint | This part of the site doesn't use cookies.