PHP Class YamlInline, cakephp-db-migrations

Author: Fabien Potencier ([email protected])
Afficher le fichier Open project: joelmoss/cakephp-db-migrations Class Usage Examples

Méthodes publiques

Méthode Description
dump ( $value ) : string Dumps PHP array to YAML.
load ( $value ) : array Load YAML into a PHP array.
parseScalar ( scalar $scalar, string $delimiters = null, $stringDelimiters = ['"', "'"], integer &$i, boolean $evaluate = true ) : string Parses scalar to yaml

Méthodes protégées

Méthode Description
dumpArray ( $value ) : string Dumps PHP array to YAML
evaluateScalar ( string $scalar ) : string Evaluates scalars and replaces magic values.
getTimestampRegex ( )
parseMapping ( string $mapping, integer &$i ) : string Parses mapping.
parseQuotedScalar ( string $scalar, integer &$i ) : string Parses quotes scalar
parseSequence ( string $sequence, integer &$i ) : string Parse sequence to yaml

Method Details

dump() public static méthode

Dumps PHP array to YAML.
public static dump ( $value ) : string
Résultat string YAML

dumpArray() protected static méthode

Dumps PHP array to YAML
protected static dumpArray ( $value ) : string
Résultat string YAML

evaluateScalar() protected static méthode

Evaluates scalars and replaces magic values.
protected static evaluateScalar ( string $scalar ) : string
$scalar string
Résultat string YAML

getTimestampRegex() protected static méthode

protected static getTimestampRegex ( )

load() public static méthode

Load YAML into a PHP array.
public static load ( $value ) : array
Résultat array PHP array

parseMapping() protected static méthode

Parses mapping.
protected static parseMapping ( string $mapping, integer &$i ) : string
$mapping string
$i integer
Résultat string YAML

parseQuotedScalar() protected static méthode

Parses quotes scalar
protected static parseQuotedScalar ( string $scalar, integer &$i ) : string
$scalar string
$i integer
Résultat string YAML

parseScalar() public static méthode

Parses scalar to yaml
public static parseScalar ( scalar $scalar, string $delimiters = null, $stringDelimiters = ['"', "'"], integer &$i, boolean $evaluate = true ) : string
$scalar scalar
$delimiters string
$i integer
$evaluate boolean
Résultat string YAML

parseSequence() protected static méthode

Parse sequence to yaml
protected static parseSequence ( string $sequence, integer &$i ) : string
$sequence string
$i integer
Résultat string YAML