setListener example


    public function __construct($event$namespace = null, $plugin = null, $listener = null, $position = null)
    {
        if ($namespace !== null) {
            $this->setNamespace($namespace);
        }
        if ($plugin !== null) {
            $this->setPlugin($plugin);
        }
        if ($listener !== null) {
            $this->setListener($listener);
        }
        parent::__construct($event);
        $this->setPosition($position);
    }

    /** * Setter method for the internal plugin property. * * @param mixed $plugin Enlight_Plugin_Bootstrap|string * * @return Enlight_Event_Handler_Plugin */

    public function __construct($event$listener$position = null)
    {
        parent::__construct($event);
        $this->setListener($listener);
        $this->setPosition($position);
    }

    /** * Checks if the given listener is callable. If it is callable the listener is set * in the internal property and can be accessed by using the getListener() function. * * @param callable|array<int, object|string> $listener * * @throws Enlight_Event_Exception * * @return Enlight_Event_Handler_Default */
Home | Imprint | This part of the site doesn't use cookies.