Dumper

Dumper

class Dumper

Dumper dumps PHP variables to YAML strings.

Methods

__construct(int $indentation = 4)
setIndentation(int $num) deprecated

Sets the indentation.

string dump(mixed $input, int $inline, int $indent, int $flags)

Dumps a PHP value to YAML.

Details

__construct(int $indentation = 4)

Parameters

int $indentation

setIndentation(int $num) deprecated

deprecated

since version 3.1, to be removed in 4.0. Pass the indentation to the constructor instead.

Sets the indentation.

Parameters

int $num The amount of spaces to use for indentation of nested nodes

string dump(mixed $input, int $inline, int $indent, int $flags)

Dumps a PHP value to YAML.

Parameters

mixed $input The PHP value
int $inline The level where you switch to inline YAML
int $indent The level of indentation (used internally)
int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string

Return Value

string The YAML representation of the PHP value

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Yaml/Dumper.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部