Lines Matching refs:string

37     public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null)
51 * Converts a YAML string to a PHP value.
53 * @param string|null $value A YAML string
61 public static function parse(string $value = null, int $flags = 0, array &$references = [])
110 * Dumps a given PHP variable to a YAML string.
113 * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
117 public static function dump($value, int $flags = 0): string
170 $repr = (string) $value;
180 $repr = \is_string($value) ? "'$value'" : (string) $value;
226 * Dumps a PHP array to a YAML string.
229 * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
231 private static function dumpArray(array $value, int $flags): string
252 private static function dumpNull(int $flags): string
266 * @throws ParseException When malformed inline YAML string is parsed
268 public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null)
285 // "normal" string
301 throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename);
304 // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >)
320 * @throws ParseException When malformed inline YAML string is parsed
322 private static function parseQuotedScalar(string $scalar, int &$i = 0): string
325 throw new ParseException(sprintf('Malformed inline YAML string: "%s".', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
345 * @throws ParseException When malformed inline YAML string is parsed
347 private static function parseSequence(string $sequence, int $flags, int &$i = 0, array &$references = []): array
405 throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename);
413 * @throws ParseException When malformed inline YAML string is parsed
415 private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = [])
551 throw new ParseException(sprintf('Malformed inline YAML string: "%s".', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename);
561 private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null)
599 $s = (string) substr($scalar, 6);
641 throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename);
651 throw new ParseException(sprintf('The string "%s" could not be parsed as it uses an unsupported built-in tag.', $scalar), self::$parsedLineNumber, $scalar, self::$parsedFilename);
675 return ($scalar === (string) $cast) ? $cast : $scalar;
685 return ($scalar === (string) $cast) ? $cast : $scalar;
718 return (string) $scalar;
721 private static function parseTag(string $value, int &$i, int $flags): ?string
761 public static function evaluateBinaryScalar(string $scalar): string
776 private static function isBinaryString(string $value): bool
786 private static function getTimestampRegex(): string
807 private static function getHexRegex(): string