PHP Класс yii\helpers\BaseVarDumper

Do not use BaseVarDumper. Use [[VarDumper]] instead.
С версии: 2.0
Автор: Qiang Xue ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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