PHP Class Bolt\Twig\Handler\UtilsHandler

Afficher le fichier Open project: bolt/bolt Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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

fileExists() public méthode

Check if a file exists.
public fileExists ( string $fn, boolean $safe ) : boolean
$fn string
$safe boolean
Résultat boolean

printBacktrace() public méthode

Output pretty-printed backtrace.
public printBacktrace ( integer $depth, boolean $safe ) : string | null
$depth integer
$safe boolean
Résultat string | null

printFirebug() public méthode

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
Résultat string FirePHP formatted string

redirect() public méthode

Redirect the browser to another page.
public redirect ( string $path, boolean $safe ) : string
$path string
$safe boolean
Résultat string

request() public méthode

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
Résultat mixed