Symfony\Component\Yaml\Inline
Inline implements a YAML parser/dumper for the YAML inline syntax.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Inline
{
- // constants
- const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')';
- // members
- private $exceptionOnInvalidType;
- private $objectSupport;
- // methods
- public static array parse()
- public static string dump()
- private static string dumpArray()
- public static string parseScalar()
- private static string parseQuotedScalar()
- private static string parseSequence()
- private static string parseMapping()
- private static string evaluateScalar()
- private static string getTimestampRegex()
Constants
Name | Value |
---|---|
REGEX_QUOTED_STRING | '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')' |
Members
private
- $exceptionOnInvalidType
- $objectSupport
Methods
private
- dumpArray() — Dumps a PHP array to a YAML string.
- evaluateScalar() — Evaluates scalars and replaces magic values.
- getTimestampRegex() — Gets a regex that matches a YAML date.
- parseMapping() — Parses a mapping to a YAML string.
- parseQuotedScalar() — Parses a quoted scalar to YAML.
- parseSequence() — Parses a sequence to a YAML string.
public
- dump() — Dumps a given PHP variable to a YAML string.
- parse() — Converts a YAML string to a PHP array.
- parseScalar() — Parses a scalar to a YAML string.