MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
Referência à classe Parser

Membros públicos

 __construct ($offset=0)
 
 parse ($value)
 

Membros protegidos

 getRealCurrentLineNb ()
 
 getCurrentLineIndentation ()
 
 getNextEmbedBlock ($indentation=null)
 
 moveToNextLine ()
 
 moveToPreviousLine ()
 
 parseValue ($value)
 
 parseFoldedScalar ($separator, $indicator='', $indentation=0)
 
 isNextLineIndented ()
 
 isCurrentLineEmpty ()
 
 isCurrentLineBlank ()
 
 isCurrentLineComment ()
 
 cleanup ($value)
 

Atributos Protegidos

 $offset = 0
 
 $lines = array()
 
 $currentLineNb = -1
 
 $currentLine = ''
 
 $refs = array()
 

Descrição detalhada

Definido na linha 20 do ficheiro Parser.php.

Documentação dos Construtores & Destrutor

◆ __construct()

__construct ( $offset = 0)

Constructor

Parâmetros
integer$offsetThe offset of YAML document (used for line numbers in error messages)

Definido na linha 33 do ficheiro Parser.php.

Documentação das funções

◆ cleanup()

cleanup ( $value)
protected

Cleanups a YAML string to be parsed.

Parâmetros
string$valueThe input YAML string
Retorna
string A cleaned up YAML string

Definido na linha 562 do ficheiro Parser.php.

◆ getCurrentLineIndentation()

getCurrentLineIndentation ( )
protected

Returns the current line indentation.

Retorna
integer The current line indentation

Definido na linha 274 do ficheiro Parser.php.

◆ getNextEmbedBlock()

getNextEmbedBlock ( $indentation = null)
protected

Returns the next embed block of YAML.

Parâmetros
integer$indentationThe indent level at which the block is to be read, or null for default
Retorna
string A YAML string

Definido na linha 286 do ficheiro Parser.php.

◆ getRealCurrentLineNb()

getRealCurrentLineNb ( )
protected

Returns the current line number (takes the offset into account).

Retorna
integer The current line number

Definido na linha 264 do ficheiro Parser.php.

◆ isCurrentLineBlank()

isCurrentLineBlank ( )
protected

Returns true if the current line is blank.

Retorna
Boolean Returns true if the current line is blank, false otherwise

Definido na linha 538 do ficheiro Parser.php.

◆ isCurrentLineComment()

isCurrentLineComment ( )
protected

Returns true if the current line is a comment line.

Retorna
Boolean Returns true if the current line is a comment line, false otherwise

Definido na linha 548 do ficheiro Parser.php.

◆ isCurrentLineEmpty()

isCurrentLineEmpty ( )
protected

Returns true if the current line is blank or if it is a comment line.

Retorna
Boolean Returns true if the current line is empty or if it is a comment line, false otherwise

Definido na linha 528 do ficheiro Parser.php.

◆ isNextLineIndented()

isNextLineIndented ( )
protected

Returns true if the next line is indented.

Retorna
Boolean Returns true if the next line is indented, false otherwise

Definido na linha 497 do ficheiro Parser.php.

◆ moveToNextLine()

moveToNextLine ( )
protected

Moves the parser to the next line.

Definido na linha 347 do ficheiro Parser.php.

◆ moveToPreviousLine()

moveToPreviousLine ( )
protected

Moves the parser to the previous line.

Definido na linha 362 do ficheiro Parser.php.

◆ parse()

parse ( $value)

Parses a YAML string to a PHP value.

Parâmetros
string$valueA YAML string
Retorna
mixed A PHP value
Excepções

InvalidArgumentException If the YAML is not valid

Definido na linha 47 do ficheiro Parser.php.

◆ parseFoldedScalar()

parseFoldedScalar ( $separator,
$indicator = '',
$indentation = 0 )
protected

Parses a folded scalar.

Parâmetros
string$separatorThe separator that was used to begin this folded scalar (| or >)
string$indicatorThe indicator that was used to begin this folded scalar (+ or -)
integer$indentationThe indentation that was used to begin this folded scalar
Retorna
string The text value

Definido na linha 415 do ficheiro Parser.php.

◆ parseValue()

parseValue ( $value)
protected

Parses a YAML value.

Parâmetros
string$valueA YAML value
Retorna
mixed A PHP value

Definido na linha 374 do ficheiro Parser.php.

Documentação dos campos e atributos

◆ $currentLine

$currentLine = ''
protected

Definido na linha 25 do ficheiro Parser.php.

◆ $currentLineNb

$currentLineNb = -1
protected

Definido na linha 24 do ficheiro Parser.php.

◆ $lines

$lines = array()
protected

Definido na linha 23 do ficheiro Parser.php.

◆ $offset

$offset = 0
protected

Definido na linha 22 do ficheiro Parser.php.

◆ $refs

$refs = array()
protected

Definido na linha 26 do ficheiro Parser.php.


A documentação para esta classe foi gerada a partir do seguinte ficheiro: