parseControllerDefinition example

namespace Symfony\Component\HttpKernel\Exception;

/** * @author Grégoire Pineau <lyrixx@lyrixx.info> */
class ControllerDoesNotReturnResponseException extends \LogicException
{
    public function __construct(string $message, callable $controller, string $file, int $line)
    {
        parent::__construct($message);

        if (!$controllerDefinition = $this->parseControllerDefinition($controller)) {
            return;
        }

        $this->file = $controllerDefinition['file'];
        $this->line = $controllerDefinition['line'];
        $r = new \ReflectionProperty(\Exception::class, 'trace');
        $r->setValue($thisarray_merge([
            [
                'line' => $line,
                'file' => $file,
            ],
        ],
namespace Symfony\Component\HttpKernel\Exception;

/** * @author Grégoire Pineau <lyrixx@lyrixx.info> */
class ControllerDoesNotReturnResponseException extends \LogicException
{
    public function __construct(string $message, callable $controller, string $file, int $line)
    {
        parent::__construct($message);

        if (!$controllerDefinition = $this->parseControllerDefinition($controller)) {
            return;
        }

        $this->file = $controllerDefinition['file'];
        $this->line = $controllerDefinition['line'];
        $r = new \ReflectionProperty(\Exception::class, 'trace');
        $r->setValue($thisarray_merge([
            [
                'line' => $line,
                'file' => $file,
            ],
        ],
Home | Imprint | This part of the site doesn't use cookies.