MIOLO20
Toggle main menu visibility
Página principal
Estruturas de dados
Estruturas de dados
Hierarquia de classes
Campos de dados
Tudo
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Funções
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variáveis
$
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Ficheiros
Lista de ficheiros
Globais
Tudo
$
_
a
c
d
e
f
g
i
l
m
o
p
r
s
u
Funções
Variáveis
$
_
c
e
f
l
m
o
p
s
Exemplos
•
Tudo
Estruturas de dados
Namespaces
Ficheiros
Funções
Variáveis
Carregando...
Procurando...
Nenhuma entrada encontrada
Dumper.php
Ir para a documentação deste ficheiro.
1
<?php
2
3
namespace
Symfony\Component\Yaml
;
4
5
/*
6
* This file is part of the symfony package.
7
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
8
*
9
* For the full copyright and license information, please view the LICENSE
10
* file that was distributed with this source code.
11
*/
12
20
class
Dumper
21
{
31
public
function
dump
($input, $inline = 0, $indent = 0)
32
{
33
$output =
''
;
34
$prefix = $indent ? str_repeat(
' '
, $indent) :
''
;
35
36
if
($inline <= 0 || !is_array($input) || empty($input))
37
{
38
$output .= $prefix.Inline::dump($input);
39
}
40
else
41
{
42
$isAHash = array_keys($input) !== range(0, count($input) - 1);
43
44
foreach
($input as $key => $value)
45
{
46
$willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value);
47
48
$output .= sprintf(
'%s%s%s%s'
,
49
$prefix,
50
$isAHash ?
Inline::dump
($key).
':'
:
'-'
,
51
$willBeInlined ?
' '
:
"\n"
,
52
$this->
dump
($value, $inline - 1, $willBeInlined ? 0 : $indent + 2)
53
).($willBeInlined ?
"\n"
:
''
);
54
}
55
}
56
57
return
$output;
58
}
31
public
function
dump
($input, $inline = 0, $indent = 0) {
…
}
59
}
20
class
Dumper
{
…
};
Symfony\Component\Yaml\Dumper
Definição
Dumper.php:21
Symfony\Component\Yaml\Dumper\dump
dump($input, $inline=0, $indent=0)
Definição
Dumper.php:31
Symfony\Component\Yaml\Inline\dump
static dump($value)
Definição
Inline.php:58
Symfony\Component\Yaml
Definição
Dumper.php:3
classes
extensions
doctrine-dbal
Doctrine
Symfony
Component
Yaml
Dumper.php
Gerado por
1.10.0