Bolt\Twig\TwigExtension::printBacktrace PHP Method

printBacktrace() public method

See also: Bolt\Twig\Handler\UtilsHandler::printBacktrace()
public printBacktrace ( $depth = 15 )
    public function printBacktrace($depth = 15)
    {
        return $this->handlers['utils']->printBacktrace($depth, $this->safe);
    }

Usage Example

コード例 #1
0
 public function testPrintBacktrace()
 {
     $this->stubVarDumper();
     // First test with debug off
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $twig = new TwigExtension($app, $handlers, false);
     $app['debug'] = false;
     $this->assertNull($twig->printBacktrace());
     // Safe mode test
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $twig = new TwigExtension($app, $handlers, true);
     $this->assertNull($twig->printBacktrace());
     // Debug mode
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $twig = new TwigExtension($app, $handlers, false);
     $this->assertNotEmpty($twig->printBacktrace());
 }
All Usage Examples Of Bolt\Twig\TwigExtension::printBacktrace