getScript() protected method

Returns the script to execute when the request must be insulated.
protected getScript ( Request $request ) : string
$request Symfony\Component\HttpFoundation\Request A Request instance
return string
Ejemplo n.º 1
0
 protected function getScript($request)
 {
     $script = parent::getScript($request);
     $autoload = file_exists(__DIR__ . '/../../vendor/autoload.php') ? __DIR__ . '/../../vendor/autoload.php' : __DIR__ . '/../../../../../../vendor/autoload.php';
     $script = preg_replace('/(\\->register\\(\\);)/', "\$0\nrequire_once '{$autoload}';\n", $script);
     return $script;
 }
Ejemplo n.º 2
0
    protected function getScript($request)
    {
        $script = parent::getScript($request);

        $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '".__DIR__."/TestHttpKernel.php';", $script);

        return $script;
    }
Ejemplo n.º 3
0
 protected function getScript($request)
 {
     $script = parent::getScript($request);
     $script = preg_replace('/(\\->register\\(\\);)/', "\$0\nrequire_once '" . __DIR__ . "/../bootstrap.php';", $script);
     return $script;
 }