Parser parses YAML strings to convert them to PHP arrays.
author |
Fabien Potencier |
---|
__construct(integer $offset)
integer
The offset of YAML document (used for line numbers in error messages)
parse(string $value) : mixed
throws |
If the YAML is not valid |
---|---|
string
A YAML string
mixed
A PHP value
getRealCurrentLineNb() : integer
integer
The current line number
getCurrentLineIndentation() : integer
integer
The current line indentation
getNextEmbedBlock(integer $indentation = null) : string
throws |
When indentation problem are detected |
---|---|
integer
The indent level at which the block is to be read, or null for default
string
A YAML string
moveToNextLine() : Boolean
Boolean
moveToPreviousLine()
parseValue(string $value) : mixed
throws |
When reference does not exist |
---|---|
string
A YAML value
mixed
A PHP value
parseFoldedScalar(string $separator, string $indicator = '', integer $indentation) : string
string
The separator that was used to begin this folded scalar (| or >)
string
The indicator that was used to begin this folded scalar (+ or -)
integer
The indentation that was used to begin this folded scalar
string
The text value
isNextLineIndented() : Boolean
Boolean
Returns true if the next line is indented, false otherwise
isCurrentLineEmpty() : Boolean
Boolean
Returns true if the current line is empty or if it is a comment line, false otherwise
isCurrentLineBlank() : Boolean
Boolean
Returns true if the current line is blank, false otherwise
isCurrentLineComment() : Boolean
Boolean
Returns true if the current line is a comment line, false otherwise
cleanup(string $value) : string
string
The input YAML string
string
A cleaned up YAML string
offset :
lines :
currentLineNb :
currentLine :
refs :