PHP 클래스 Bolt\Twig\Handler\UtilsHandler

파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

공개 메소드들

메소드 설명
__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