PHP 클래스 yii\helpers\BaseVarDumper

Do not use BaseVarDumper. Use [[VarDumper]] instead.
부터: 2.0
저자: Qiang Xue ([email protected])
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 메소드들

메소드 설명
dump ( mixed $var, integer $depth = 10, boolean $highlight = false ) Displays a variable.
dumpAsString ( mixed $var, integer $depth = 10, boolean $highlight = false ) : string Dumps a variable in terms of a string.
export ( mixed $var ) : string Exports a variable as a string representation.

비공개 메소드들

메소드 설명
dumpInternal ( mixed $var, integer $level )
exportClosure ( Closure $closure ) : string Exports a [[Closure]] instance.
exportInternal ( mixed $var, integer $level )

메소드 상세

dump() 공개 정적인 메소드

This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers.
public static dump ( mixed $var, integer $depth = 10, boolean $highlight = false )
$var mixed variable to be dumped
$depth integer maximum depth that the dumper should go into the variable. Defaults to 10.
$highlight boolean whether the result should be syntax-highlighted

dumpAsString() 공개 정적인 메소드

This method achieves the similar functionality as var_dump and print_r but is more robust when handling complex objects such as Yii controllers.
public static dumpAsString ( mixed $var, integer $depth = 10, boolean $highlight = false ) : string
$var mixed variable to be dumped
$depth integer maximum depth that the dumper should go into the variable. Defaults to 10.
$highlight boolean whether the result should be syntax-highlighted
리턴 string the string representation of the variable

export() 공개 정적인 메소드

The string is a valid PHP expression that can be evaluated by PHP parser and the evaluation result will give back the variable value. This method is similar to var_export(). The main difference is that it generates more compact string representation using short array syntax. It also handles objects by using the PHP functions serialize() and unserialize(). PHP 5.4 or above is required to parse the exported value.
public static export ( mixed $var ) : string
$var mixed the variable to be exported.
리턴 string a string representation of the variable