public function getNewSandBox(callable $action)
    {
        $errorHandler = $this->getOption('error_reporting');
        if ($errorHandler !== null && !is_callable($errorHandler)) {
            $errorReporting = $errorHandler;
            $errorHandler = function ($number, $message, $file, $line) use ($errorReporting) {
                if ($errorReporting & $number) {
                    throw new ErrorException($message, 0, $number, $file, $line);
                }

                return true;
            };
        }

        return new SandBox($action, $errorHandler);
    }
public function getNewSandBox(callable $action)
    {
        $errorHandler = $this->getOption('error_reporting');
        if ($errorHandler !== null && !is_callable($errorHandler)) {
            $errorReporting = $errorHandler;
            $errorHandler = function ($number, $message, $file, $line) use ($errorReporting) {
                if ($errorReporting & $number) {
                    throw new ErrorException($message, 0, $number, $file, $line);
                }

                return true;
            };
        }

        return new SandBox($action, $errorHandler);
    }
public function getNewSandBox ( callable $ action ) { $ errorHandler = $ this -> getOption ( 'error_reporting' ) ; if ( $ errorHandler !== null && ! is_callable ( $ errorHandler ) ) { $ errorReporting = $ errorHandler ; $ errorHandler = function ( $ number , $ message , $ file , $ line ) use ( $ errorReporting ) { if ( $ errorReporting & $ number ) { throw new ErrorException ( $ message , 0 , $ number , $ file , $ line ) ; } return true ; } ; } return new SandBox ( $ action , $ errorHandler ) ; }
Return a sandbox with renderer settings for a given callable action.

@param callable $action

@return SandBox
Return a sandbox with renderer settings for a given callable action .