PHP Класс Bolt\Twig\Handler\UtilsHandler

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Silex\Application $app )
fileExists ( string $fn, boolean $safe ) : boolean Check if a file exists.
printBacktrace ( integer $depth, boolean $safe ) : string | null Output pretty-printed backtrace.
printFirebug ( mixed $var, mixed $msg, boolean $safe ) : string Send debug data to the developers FirePHP instance in-browser.
redirect ( string $path, boolean $safe ) : string Redirect the browser to another page.
request ( string $parameter, string $from, boolean $stripSlashes, boolean $safe ) : mixed Return the requested parameter from $_REQUEST, $_GET or $_POST.

Приватные методы

Метод Описание
allowDebug ( boolean $safe ) : boolean Helper function to determine if we're supposed to allow backtrace and firebug. If $safe is set or $this->app['debug'] is false, we don't allow it. Otherwise we show only to _logged on_ users, _or_ non-authenticated users, but then debug_show_loggedoff needs to be set.

Описание методов

__construct() публичный Метод

public __construct ( Silex\Application $app )
$app Silex\Application

fileExists() публичный Метод

Check if a file exists.
public fileExists ( string $fn, boolean $safe ) : boolean
$fn string
$safe boolean
Результат boolean

printBacktrace() публичный Метод

Output pretty-printed backtrace.
public printBacktrace ( integer $depth, boolean $safe ) : string | null
$depth integer
$safe boolean
Результат string | null

printFirebug() публичный Метод

Send debug data to the developers FirePHP instance in-browser.
public printFirebug ( mixed $var, mixed $msg, boolean $safe ) : string
$var mixed The data to be dumped into FirePHP
$msg mixed The message to associate with the data
$safe boolean
Результат string FirePHP formatted string

redirect() публичный Метод

Redirect the browser to another page.
public redirect ( string $path, boolean $safe ) : string
$path string
$safe boolean
Результат string

request() публичный Метод

Return the requested parameter from $_REQUEST, $_GET or $_POST.
public request ( string $parameter, string $from, boolean $stripSlashes, boolean $safe ) : mixed
$parameter string The parameter to get
$from string 'GET' or 'POST', all the others falls back to REQUEST.
$stripSlashes boolean Apply stripslashes. Defaults to false.
$safe boolean
Результат mixed