ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Inline implements a YAML parser/dumper for the YAML inline syntax. More...
Static Public Member Functions | |
static | parse ($value, $flags=0, $references=array()) |
Converts a YAML string to a PHP array. More... | |
static | dump ($value, $flags=0) |
Dumps a given PHP variable to a YAML string. More... | |
static | isHash (array $value) |
Check if given array is hash or just normal indexed array. More... | |
static | parseScalar ($scalar, $flags=0, $delimiters=null, $stringDelimiters=array('"', "'"), &$i = 0, $evaluate = true, $references = array()) |
Parses a scalar to a YAML string. More... | |
static | evaluateBinaryScalar ($scalar) |
Data Fields | |
const | REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')' |
Static Private Member Functions | |
static | dumpArray ($value, $flags) |
Dumps a PHP array to a YAML string. More... | |
static | parseQuotedScalar ($scalar, &$i) |
Parses a quoted scalar to YAML. More... | |
static | parseSequence ($sequence, $flags, &$i=0, $references=array()) |
Parses a sequence to a YAML string. More... | |
static | parseMapping ($mapping, $flags, &$i=0, $references=array()) |
Parses a mapping to a YAML string. More... | |
static | evaluateScalar ($scalar, $flags, $references=array()) |
Evaluates scalars and replaces magic values. More... | |
static | isBinaryString ($value) |
static | getTimestampRegex () |
Gets a regex that matches a YAML date. More... | |
static | getHexRegex () |
Gets a regex that matches a YAML number in hexadecimal notation. More... | |
Static Private Attributes | |
static | $exceptionOnInvalidType = false |
static | $objectSupport = false |
static | $objectForMap = false |
Inline implements a YAML parser/dumper for the YAML inline syntax.
Definition at line 24 of file Inline.php.
|
static |
Dumps a given PHP variable to a YAML string.
mixed | $value | The PHP variable to convert |
int | $flags | A bit field of Yaml::DUMP_* constants to customize the dumped YAML string |
DumpException | When trying to dump PHP resource |
Definition at line 128 of file Inline.php.
References array, Symfony\Component\Yaml\Yaml\DUMP_EXCEPTION_ON_INVALID_TYPE, Symfony\Component\Yaml\Yaml\DUMP_OBJECT, Symfony\Component\Yaml\Yaml\DUMP_OBJECT_AS_MAP, Symfony\Component\Yaml\Escaper\escapeWithDoubleQuotes(), Symfony\Component\Yaml\Escaper\escapeWithSingleQuotes(), Symfony\Component\Yaml\Escaper\requiresDoubleQuoting(), Symfony\Component\Yaml\Escaper\requiresSingleQuoting(), and string.
Referenced by Symfony\Component\Yaml\Dumper\dump(), Symfony\Component\Yaml\Tests\InlineTest\testDump(), Symfony\Component\Yaml\Tests\InlineTest\testDumpDateTime(), Symfony\Component\Yaml\Tests\InlineTest\testDumpNumericValueWithLocale(), and Symfony\Component\Yaml\Tests\InlineTest\testHashStringsResemblingExponentialNumericsShouldNotBeChangedToINF().
|
staticprivate |
Dumps a PHP array to a YAML string.
array | $value | The PHP array to dump |
int | $flags | A bit field of Yaml::DUMP_* constants to customize the dumped YAML string |
Definition at line 247 of file Inline.php.
References $key, $output, and array.
|
static |
string | $scalar |
Definition at line 631 of file Inline.php.
Referenced by Symfony\Component\Yaml\Parser\parseValue().
|
staticprivate |
Evaluates scalars and replaces magic values.
string | $scalar | |
int | $flags | |
array | $references |
ParseException | when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved |
Definition at line 521 of file Inline.php.
References $time, Symfony\Component\Yaml\Yaml\PARSE_DATETIME, and string.
|
staticprivate |
Gets a regex that matches a YAML number in hexadecimal notation.
Definition at line 681 of file Inline.php.
|
staticprivate |
Gets a regex that matches a YAML date.
Definition at line 658 of file Inline.php.
References EOF.
|
staticprivate |
Definition at line 646 of file Inline.php.
|
static |
Check if given array is hash or just normal indexed array.
Definition at line 226 of file Inline.php.
References $key.
Referenced by Symfony\Component\Yaml\Dumper\dump(), and Symfony\Component\Yaml\Tests\InlineTest\testIsHash().
|
static |
Converts a YAML string to a PHP array.
string | $value | A YAML string |
int | $flags | A bit field of PARSE_* constants to customize the YAML parser behavior |
array | $references | Mapping of variable names to values |
ParseException |
Definition at line 43 of file Inline.php.
References $i, $result, array, Symfony\Component\Yaml\Yaml\PARSE_EXCEPTION_ON_INVALID_TYPE, Symfony\Component\Yaml\Yaml\PARSE_OBJECT, and Symfony\Component\Yaml\Yaml\PARSE_OBJECT_FOR_MAP.
Referenced by Symfony\Component\Yaml\Parser\parse(), Symfony\Component\Yaml\Parser\parseValue(), Symfony\Component\Yaml\Tests\InlineTest\testDump(), Symfony\Component\Yaml\Tests\InlineTest\testHashStringsResemblingExponentialNumericsShouldNotBeChangedToINF(), Symfony\Component\Yaml\Tests\InlineTest\testParse(), Symfony\Component\Yaml\Tests\InlineTest\testParseBinaryData(), Symfony\Component\Yaml\Tests\InlineTest\testParseInvalidBinaryData(), Symfony\Component\Yaml\Tests\InlineTest\testParseInvalidMappingKeyShouldThrowException(), Symfony\Component\Yaml\Tests\InlineTest\testParseInvalidMappingShouldThrowException(), Symfony\Component\Yaml\Tests\InlineTest\testParseInvalidSequenceShouldThrowException(), Symfony\Component\Yaml\Tests\InlineTest\testParseMapReferenceInSequence(), Symfony\Component\Yaml\Tests\InlineTest\testParseMapReferenceInSequenceAsFifthArgument(), Symfony\Component\Yaml\Tests\InlineTest\testParseNestedTimestampListAsDateTimeObject(), Symfony\Component\Yaml\Tests\InlineTest\testParseReferences(), Symfony\Component\Yaml\Tests\InlineTest\testParseReferencesAsFifthArgument(), Symfony\Component\Yaml\Tests\InlineTest\testParseScalarWithIncorrectlyDoubleQuotedStringShouldThrowException(), Symfony\Component\Yaml\Tests\InlineTest\testParseScalarWithIncorrectlyQuotedStringShouldThrowException(), Symfony\Component\Yaml\Tests\InlineTest\testParseScalarWithNonEscapedBlackslashAtTheEndShouldThrowException(), Symfony\Component\Yaml\Tests\InlineTest\testParseScalarWithNonEscapedBlackslashShouldThrowException(), Symfony\Component\Yaml\Tests\InlineTest\testParseTimestampAsDateTimeObject(), Symfony\Component\Yaml\Tests\InlineTest\testParseTimestampAsUnixTimestampByDefault(), Symfony\Component\Yaml\Tests\InlineTest\testParseUnquotedAsterisk(), Symfony\Component\Yaml\Tests\InlineTest\testParseUnquotedAsteriskFollowedByAComment(), Symfony\Component\Yaml\Tests\InlineTest\testParseUnquotedScalarStartingWithPercentCharacter(), Symfony\Component\Yaml\Tests\InlineTest\testParseUnquotedScalarStartingWithReservedIndicator(), Symfony\Component\Yaml\Tests\InlineTest\testParseUnquotedScalarStartingWithScalarIndicator(), Symfony\Component\Yaml\Tests\InlineTest\testParseWithMapObjects(), and Symfony\Component\Yaml\Tests\InlineTest\testParseWithMapObjectsPassingTrue().
|
staticprivate |
Parses a mapping to a YAML string.
string | $mapping | |
int | $flags | |
int | &$i | |
array | $references |
ParseException | When malformed inline YAML string is parsed |
Definition at line 433 of file Inline.php.
References $i, $key, $output, and array.
|
staticprivate |
Parses a quoted scalar to YAML.
string | $scalar | |
int | &$i |
ParseException | When malformed inline YAML string is parsed |
Definition at line 341 of file Inline.php.
|
static |
Parses a scalar to a YAML string.
string | $scalar | |
int | $flags | |
string | $delimiters | |
array | $stringDelimiters | |
int | &$i | |
bool | $evaluate | |
array | $references |
ParseException | When malformed inline YAML string is parsed |
Definition at line 285 of file Inline.php.
Referenced by Symfony\Component\Yaml\Parser\parse(), and Symfony\Component\Yaml\Tests\InlineTest\testParseScalarWithCorrectlyQuotedStringShouldReturnString().
|
staticprivate |
Parses a sequence to a YAML string.
string | $sequence | |
int | $flags | |
int | &$i | |
array | $references |
ParseException | When malformed inline YAML string is parsed |
Definition at line 373 of file Inline.php.
References $i, $output, and array.
|
staticprivate |
Definition at line 28 of file Inline.php.
|
staticprivate |
Definition at line 30 of file Inline.php.
|
staticprivate |
Definition at line 29 of file Inline.php.
const Symfony\Component\Yaml\Inline::REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')' |
Definition at line 26 of file Inline.php.
Referenced by Symfony\Component\Yaml\Parser\parse().