Lines Matching refs:flags

47      * @param int   $flags  A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
49 public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string
55 if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) {
60 $output .= $prefix.Inline::dump($input, $flags);
62 $output .= $this->dumpTaggedValue($input, $inline, $indent, $flags, $prefix);
71 if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) {
84 $output .= sprintf('%s%s%s |%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator, $blockChompingIndicator);
98 $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag());
100 if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
114 $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n";
117 $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags);
125 if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) {
133 $dumpAsMap ? Inline::dump($key, $flags).':' : '-',
135 $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags)
143 private function dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix): string
147 if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
161 return $output.' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n";
164 return $output."\n".$this->dump($value->getValue(), $inline - 1, $indent, $flags);