Add all listeners.

@return void

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
438022
private function populateSubscribers()
    {
        if (isset($GLOBALS['TL_EVENT_SUBSCRIBERS']) && is_array($GLOBALS['TL_EVENT_SUBSCRIBERS'])) {
            $this->addSubscribers($GLOBALS['TL_EVENT_SUBSCRIBERS']);
        }

        foreach ($this->subscriberFiles as $file) {
            // @codeCoverageIgnoreStart
            $events = (array) include $file;
            $this->addSubscribers($events);
            // @codeCoverageIgnoreEnd
        }
    }
33175
public void addListeners()
    {
        super.addListeners();
        this.getScreenRecord().getField(PackagesReportScreenRecord.JNLP_FILE_ID).addListener(new ReadSecondaryHandler(this.getRecord(JnlpFile.JNLP_FILE_FILE)));
    }
507435
public function addListeners($event, $listeners)
    {
        foreach ($listeners as $listener) {
            $this->addListener($event, $listener);
        }
    }
1097194
protected static function loadListeners() {
		
		// default var
		$configDir = Config::getOption("configDir");
		
		// make sure the listener data exists
		if (file_exists($configDir."/listeners.json")) {
			
			// get listener list data
			$listenerList = json_decode(file_get_contents($configDir."/listeners.json"), true);
			
			// get the listener info
			foreach ($listenerList["listeners"] as $listenerName) {
				
				if ($listenerName[0] != "_") {
					$listener  = new $listenerName();
					$listeners = $listener->getListeners();
					foreach ($listeners as $event => $eventProps) {
						$eventPriority = (isset($eventProps["priority"])) ? $eventProps["priority"] : 0;
						self::$instance->addListener($event, array($listener, $eventProps["callable"]), $eventPriority);
					}
				}
				
			}
			
		}
		
	}
1036789
public void addListeners()
    {
        super.addListeners();
        this.getMainRecord().addListener(new MessageDetailDefTransHandler(null));
        String strManualTransportID = Integer.toString(((ReferenceField)this.getMainRecord().getField(MessageDetail.MESSAGE_TRANSPORT_ID)).getIDFromCode(MessageTransport.MANUAL));
        this.getMainRecord().getField(MessageDetail.MESSAGE_TRANSPORT_ID).setDefault(strManualTransportID);
    }
709966
public void addListeners()
    {
        super.addListeners();
        
        Record recUserInfo = this.getMainRecord();
        recUserInfo.setKeyArea(UserInfo.USER_NAME_KEY);
        
        if (m_recHeader != null)
            ((ReferenceField)this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID)).setReference(m_recHeader);
        
        recUserInfo.addListener(new ExtractRangeFilter(UserInfo.USER_NAME, this.getScreenRecord().getField(UserScreenRecord.NAME_SORT)));
        recUserInfo.addListener(new CompareFileFilter(recUserInfo.getField(UserInfo.USER_GROUP_ID), this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID), "=", null, true));
        
        this.getScreenRecord().getField(UserScreenRecord.NAME_SORT).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(UserScreenRecord.USER_GROUP_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord(). addListener(new SetupNewUserHandler(null));
    }
130490
public void addListeners()
    {
        super.addListeners();
        if (m_properties.size() > 0)
        {
            Record recPropertiesInput = this.getMainRecord();
            recPropertiesInput.setKeyArea(PropertiesInput.KEY_KEY);
            Iterator<Object> iterator = m_properties.keySet().iterator();
            while (iterator.hasNext())
            {
                String strKey = (String)iterator.next();
                try {
                    recPropertiesInput.addNew();
                    recPropertiesInput.getField(PropertiesInput.KEY).setString(strKey);
                    if (!recPropertiesInput.seek(null))
                    {
                        recPropertiesInput.addNew();
                        recPropertiesInput.getField(PropertiesInput.KEY).setString(strKey);
                        recPropertiesInput.add();
                    }
                } catch (DBException ex) {
                    ex.printStackTrace();
                }
            }
            //?this.getMainRecord().getField(PropertiesInput.KEY).setEnabled(false);
        }
    }
698243
private function bindEventListenersEvents()
	{
		if ($this->_eventListeners && !$this->_listenerInstances) {
			foreach ($this->_eventListeners as $listener) {
                
				$listener = static::getListener($listener);
				
				$events = $listener->events();
				
				if ($events) foreach ($events as $name => $handler) {
					static::on($name, is_string($handler) ? [$listener, $handler] : $handler);
				}
			}
		}
	}
1020732
public function registerEventListeners()
    {
        if ( $this->loadGlobalEvents )
        {
            $listeners = eZINI::instance()->variable( 'Event', 'Listeners' );
            foreach ( $listeners as $listener )
            {
                // $listener may be empty if some override logic has been involved
                if ( $listener == "" )
                {
                    continue;
                }

                // format from ini is seperated by @
                list( $event, $callback ) = explode( '@', $listener );
                $this->attach( $event, $callback );
            }
        }
    }
231007
public function attachDefaultListeners()
    {
        parent::attachDefaultListeners();
        $events          = $this->getEventManager();
        $this->defaultListener->attach($events);
        return $this;
    }
1196585
static private function bindEventListenersEvents()
    {
    	if (self::$_eventListeners && !self::$_elInstances) {
    		foreach (self::$_eventListeners as $class => $listeners) {
    			if ($listeners) foreach ($listeners as $listener) {
    				
    				$listener = self::getListener($listener);
    				
    				$events = $listener->events();
    				
    				if ($events) foreach ($events as $name => $handler) {
    					Event::on($class, $name, is_string($handler) ? [$listener, $handler] : $handler);
    				}
    			}
    		}
    	}
    }
241399
function addListener(event, callback, meta) {
  event.listeners.push(callback);
  event.meta.set(callback, meta);
}
878298
public function addListeners(array $events_config)
    {
        foreach ($events_config as $name => $listeners) {
            if (false === array_key_exists('listeners', $listeners)) {
                $this->application->warning("None listener found for `$name` event.");
                continue;
            }

            $listeners['listeners'] = (array) $listeners['listeners'];
            foreach ($listeners['listeners'] as $listener) {
                $this->addListener($name, $listener);
            }
        }
    }
1086683
public void addListeners()
    {
        super.addListeners();
        Record record = this.getMainRecord();
        Record recClassInfo = this.getRecord(ClassInfo.CLASS_INFO_FILE);
        if (recClassInfo != null)
        {
            record.setKeyArea(ScreenIn.SCREEN_IN_PROG_NAME_KEY);
            SubFileFilter listener = new SubFileFilter(recClassInfo.getField(ClassInfo.CLASS_NAME), ScreenIn.SCREEN_IN_PROG_NAME, null, null, null, null, true);
            record.addListener(listener);
            recClassInfo.getField(ClassInfo.CLASS_NAME).addListener(new FieldReSelectHandler(this));
        }
    }
456737
public function addListener($cb)
    {
        if ($this->state === self::STATE_DONE) {
            $cb($this);
            return;
        }
        $this->listeners[] = CallbackWrapper::wrap($cb);
    }
61737
public function addListener($cb)
    {
        if ($this->state === self::STATE_DONE) {
            if ($cb !== null) {
                $cb($this);
            }
            return;
        }
        if ($cb !== null) {
            $this->listeners->push($cb);
        }
        if ($this->state === self::STATE_WAITING) {
            $i = 1;
            $n = func_num_args();
            while ($i < $n) {
                $this->args[] = func_get_arg($i);
                ++$i;
            }
            $this->state = self::STATE_RUNNING;
            $func = $this->producer;
            $func($this);
        }
    }
73883
public static function registerListeners(array $listeners)
    {
        foreach ($listeners as $eventName => $eventListeners) {
            foreach ($eventListeners as $listenerClassName) {
                $listener = self::getBean($listenerClassName);
                self::addListener($eventName, $listener);
            }
        }
    }