Event de fin

@return void
199306
protected function afterRender()
    {
        $this->logger->debug('application.afterRender.start');
        $manager = $this->getEventManager();
        $manager->notify(\FreeFW\Constants::EVENT_AFTER_RENDER);
        $this->logger->debug('application.afterRender.end');
        return $this;
    }
229304
protected function __bindEvents()
    {
        $server = $this->swoolePort ?? $this->swooleServer;

        $server->on('packet', function(\swoole_server $server, $data, $clientInfo){
            try{
                $this->trigger('packet', [
                    'server'        => $this,
                    'data'          => $data,
                    'clientInfo'    => $clientInfo,
                ], $this, PacketEventParam::class);
            }
            catch(\Throwable $ex)
            {
                App::getBean('ErrorLog')->onException($ex);
            }
        });
        
    }
1000684
public function run(): void
    {
        // dynamicly parse input params
        $args = func_get_args();
        
        if (count($args) < 1) {
            return;
        }
        
        // get event name
        $eventName = array_shift($args);
        // get event args as array if passed
        $eventArgs = @array_shift($args);

        // if event is registered
        if (isset($this->events[$eventName]) && Any::isArray($this->events[$eventName])) {
            foreach ($this->events[$eventName] as $callback) {
                // call anonymous function with args if passed
                call_user_func_array($callback, $eventArgs);
            }
        }
        
        // set to post runned actions
        $this->runned[$eventName] = $eventArgs;
    }
401536
public function lastEvent(): Event
    {
        if ($count = count($this->events)) {
            return $this->events[$count - 1];
        }

        throw new UndefinedEventException(0);
    }
1130067
public function registerEvents()
    {
        $job = & $this->job;

        Event::listen(Event::JOB_PERFORM, function ($event, $_job) use (&$job) {
            $job = $_job;
        });
    }
3328
private function firePendingEvents()
	{
		if ( ! empty($this->_pendingEvents)) {
			foreach ($this->_pendingEvents as $event) {
				$this->owner->trigger($event->name, $event);
			}
			$this->_pendingEvents = [];

			if ( $this->getStatusAccessor() != null) {
				$this->_statusAccessor->commitStatus($this->owner);
			}
		}
	}
1374475
private function registerEvents()
    {
        foreach ($this->getSetting('events', []) as $event => $listeners) {
            foreach ($listeners as $listener) {
                Event::bind($event, $listener);
            }
        }
    }
967187
public function beforeModeration(): bool
    {
        if (method_exists($this->owner, 'beforeModeration')) {
            if (!$this->owner->beforeModeration()) {
                return false;
            }
        }

        $event = new ModelEvent();
        $this->owner->trigger(self::EVENT_BEFORE_MODERATION, $event);

        return $event->isValid;
    }
329892
public static function initEvent()
    {
        if (!self::$supported) {
            return;
        }
        self::updateConfig();
        self::$fd = eio_get_event_stream();
        self::$ev = EventLoop::$instance->event(self::$fd,
            \Event::READ | \Event::PERSIST,
            function ($fd, $events, $arg) {
                while (eio_nreqs()) {
                    eio_poll();
                }
            }
        );
        self::$ev->add();
    }
337902
public function lastEvent(): Event
    {
        if ($count = count($this->calls)) {
            return $this->calls[$count - 1];
        }

        throw new UndefinedEventException(0);
    }
672052
protected function scanEvents()
    {
        if (empty($this->scanEvents))
        {
            return;
        }

        $scanner = new EventScanner($this->scanEvents);

        file_put_contents(
          $this->finder->getScannedEventsPath(), '<?php ' . $scanner->getEventDefinitions()
        );
    }
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);
				}
			}
		}
	}
907852
protected function dumpEvents()
    {
        if ($this->config->events === true && version_compare($this->version, '5.1.12') >= 0) {
            $events = $this->pdo->prepare('SHOW EVENTS');
            $events->execute();

            foreach ($events->fetchAll(\PDO::FETCH_ASSOC) as $a) {
                $event = $a['Name'];

                if (in_array($event, (array) $this->config->ignore, true)) {
                    continue;
                }

                if ((string) $this->config->prefix !== '' && strpos($event, $this->config->prefix) !== 0) {
                    continue;
                }

                $structure = $this->pdo->query('SHOW CREATE EVENT `'.$event.'`');

                if ($structure = $structure->fetch(\PDO::FETCH_ASSOC)) {
                    if (isset($structure['Create Event'])) {
                        $query = $structure['Create Event'];
                        $delimiter = $this->getDelimiter('//', $query);
                        $this->write("\n-- Structure for event `{$event}`\n", false);
                        $this->write('DROP EVENT IF EXISTS `'.$event.'`');
                        $this->write("DELIMITER {$delimiter}\n{$query}\n{$delimiter}\nDELIMITER ;", false);
                    }
                }
            }
        }
    }
535877
public function afterRequest()
    {

        if (count($this->afterRequestEvents) > 0) {
            foreach ($this->afterRequestEvents as $event) {
                $event->OnEvent($this);
            }
        }
    }
194195
protected function bindEvents(): void
    {
        $userConfig = $this->app['config'][static::$abstract];

        $handler = new EventHandler($this->app->events, $userConfig);

        $handler->subscribe();

        $handler->subscribeQueueEvents($this->app->queue);

        if (isset($userConfig['send_default_pii']) && $userConfig['send_default_pii'] !== false) {
            $handler->subscribeAuthEvents();
        }
    }
464834
public function dispatch() {
        foreach ($this->_listeners as $key => $listeners) {
            foreach ($this->_events as $events) {
                if (isset($listeners->implementedEvents()[$events->getName()])) {
                    foreach ($listeners->implementedEvents()[$events->getName()] as $event) {
                        if ($events->getStatus() == Event::START && method_exists($listeners, $event)) {
                            ob_start();
                            $this->addError('EVENT call the listener "' . $key . '" "' . get_class($listeners) . '::' . $event . '" for the event "' . $events->getName() . '"', __FILE__, __LINE__, ERROR_INFORMATION);
                            $events->setResult($listeners->$event($events), get_class($listeners) . '::' . $event, get_class($listeners), $event);
                            $output = ob_get_contents();
                            ob_get_clean();

                            $this->addError('[' . $key . '] [' . get_class($listeners) . '::' . $event . '] [' . $events->getName() . "]\n[" . $output . ']', 0, 0, 0, LOG_EVENT);
                        }
                    }
                }
            }
        }
    }
209772
public function view()
    {
        $response = [
            'success' => false,
            'data' => [],
            'errors' => []
        ];

        if ($this->request->is(['post', 'patch', 'put'])) {
            $data = $this->request->getData();
            $result = $this->CalendarEvents->getEventInfo($data['id']);

            if (!empty($result)) {
                $response['success'] = true;
                $response['data'] = $result;
            } else {
                $response['errors'][] = "Couldn't find Event with id {$data['id']}";
            }
        }

        $this->set(compact('response'));
        $this->set('_serialize', 'response');
    }