PHP Class Yosymfony\Toml\TomlBuilder

Mostrar archivo Open project: yosymfony/toml Class Usage Examples

Protected Properties

Property Type Description
$currentArrayOfTables
$currentKey
$currentLine
$currentTable
$keyList
$keyListArryOfTables
$keyListInvalidArrayOfTables
$output
$prefix

Public Methods

Method Description
__constructor ( integer $indent = 4 ) Constructor.
addArrayTables ( string $key ) : TomlBuilder
addComment ( string $comment ) : TomlBuilder Add a comment line.
addGroup ( string $keygroup ) : TomlBuilder Alias for addTable method.
addTable ( string $key ) : TomlBuilder Add a table.
addValue ( string $key, mixed $val, string $comment = null ) : TomlBuilder Add a key-value.
getTomlString ( ) : string Get the TOML string.

Private Methods

Method Description
addInvalidArrayOfTablesKey ( array $keyParts )
addKey ( $key )
addKeyArrayOfTables ( $key, array $keyParts )
addKeyTable ( $key )
addKeyToKeyList ( $key )
append ( $val, $addPostNewline = false, $addIndentation = false, $addPreNewline = false )
dumpArray ( $val )
dumpBool ( $val )
dumpComment ( $val )
dumpDatetime ( $val )
dumpFloat ( $val )
dumpInteger ( $val )
dumpString ( $val )
dumpValue ( $val )
getAbsoluteKey ( $key, $currentKeyTable, $currentKeyArrayOfTables )
getArrayTablesKeyPath ( array $keyParts )
getKeyPart ( $key )
isStringValid ( string $val ) : boolean
isTableImplicit ( array $keyParts )
normalizeString ( $val )

Method Details

__constructor() public method

Constructor.
public __constructor ( integer $indent = 4 )
$indent integer The amount of spaces to use for indentation of nested nodes.

addArrayTables() public method

public addArrayTables ( string $key ) : TomlBuilder
$key string
return TomlBuilder

addComment() public method

Add a comment line.
public addComment ( string $comment ) : TomlBuilder
$comment string
return TomlBuilder

addGroup() public method

Alias for addTable method.
Deprecation: Since version 0.2
public addGroup ( string $keygroup ) : TomlBuilder
$keygroup string
return TomlBuilder

addTable() public method

Add a table.
public addTable ( string $key ) : TomlBuilder
$key string Tablename. Dot character have a special meant.
return TomlBuilder

addValue() public method

Add a key-value.
public addValue ( string $key, mixed $val, string $comment = null ) : TomlBuilder
$key string
$val mixed
$comment string
return TomlBuilder

getTomlString() public method

Get the TOML string.
public getTomlString ( ) : string
return string

Property Details

$currentArrayOfTables protected_oe property

protected $currentArrayOfTables

$currentKey protected_oe property

protected $currentKey

$currentLine protected_oe property

protected $currentLine

$currentTable protected_oe property

protected $currentTable

$keyList protected_oe property

protected $keyList

$keyListArryOfTables protected_oe property

protected $keyListArryOfTables

$keyListInvalidArrayOfTables protected_oe property

protected $keyListInvalidArrayOfTables

$output protected_oe property

protected $output

$prefix protected_oe property

protected $prefix