public static function getSubscribedEvents(): array
{ return [ KernelEvents::CONTROLLER_ARGUMENTS =>
['onKernelControllerArguments', 10
],
KernelEvents::RESPONSE =>
['onKernelResponse', -10
],
];
} private function getExpressionLanguage(): ExpressionLanguage
{ return $this->expressionLanguage ??=
class_exists(ExpressionLanguage::
class) ?
new ExpressionLanguage() :
throw new \
LogicException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".'
);
} private function toSeconds(int|string
$time): int
{ if (!
is_numeric($time)) { $now =
time();
$time =
strtotime($time,
$now) -
$now;
} return $time;
}