/
smoren
/
event-router-php
Обзор
Документация
Войти
/
smoren
/
event-router-php
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/Structs/EventRouteRule.php
48 строк
989 B
Smoren
phpdocs++
17 дек 2022, 16:05
17 дек 2022, 16:05
60701dd
Код
Авторство
О чём код?
<?php namespace Smoren\EventRouter\Structs; use Smoren\EventRouter\Interfaces\EventConfigInterface; use Smoren\EventRouter\Interfaces\EventRouteRuleInterface; /** * EventRouteRule class */ class EventRouteRule implements EventRouteRuleInterface { /** * @var EventConfigInterface event route condition */ protected EventConfigInterface $config; /** * @var callable event handler */ protected $handler; /** * EventRouteRule constructor * @param EventConfigInterface $config * @param callable $handler */ public function __construct(EventConfigInterface $config, callable $handler) { $this->config = $config; $this->handler = $handler; } /** * {@inheritDoc} */ public function getConfig(): EventConfigInterface { return $this->config; } /** * {@inheritDoc} */ public function getHandler(): callable { return $this->handler; } }