Psalm
Get started
Documentation
Paid support
Plugins
Blog
GitHub
<?php function onKernelController(callable $controller): void { if (\is_array($controller)) { $controller = $controller[0]; } else { try { $reflection = new \ReflectionFunction($controller(...)); $controller = $reflection->getClosureThis(); } catch (\ReflectionException) { return; } } }
Snippet created on May 5 2025 at 17:21 UTC
Settings
Get link