gui\Application::on PHP Метод

on() публичный Метод

Returns the next avaible object ID
public on ( string $eventName, callable $eventHandler ) : void
$eventName string the name of the event
$eventHandler callable the callback
Результат void
    public function on($eventName, callable $eventHandler)
    {
        if (!array_key_exists($eventName, $this->eventHandlers)) {
            $this->eventHandlers[$eventName] = [];
        }
        $this->eventHandlers[$eventName][] = $eventHandler;
    }