Lines Matching refs:key

199                             || self::preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $this->trimTag($values['value']), $matches)
218 self::preg_match('#^(?P<key>(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P<value>.+))?$#u', rtrim($this->currentLine), $values)
219 && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"]))
227 $key = Inline::parseScalar($values['key']);
235 if (!\is_string($key) && !\is_int($key)) {
236 throw new ParseException((is_numeric($key) ? 'Numeric' : 'Non-string').' keys are not supported. Quote your evaluable mapping keys instead.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
240 if (\is_float($key)) {
241 $key = (string) $key;
244 if ('<<' === $key && (!isset($values['value']) || '&' !== $values['value'][0] || !self::preg_match('#^&(?P<ref>[^ ]+)#u', $values['value'], $refMatches))) {
285 // If the value associated with the merge key is a sequence, then this sequence is expected to contain mapping nodes
300 // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the
301 // current mapping, unless the key already exists in it.
305 } elseif ('<<' !== $key && isset($values['value']) && '&' === $values['value'][0] && self::preg_match(self::REFERENCE_PATTERN, $values['value'], $matches)) {
314 } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) {
320 if ($allowOverwrite || !isset($data[$key])) {
322 $data[$key] = new TaggedValue($subTag, '');
324 $data[$key] = null;
327 throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine);
333 if ('<<' === $key) {
341 } elseif ($allowOverwrite || !isset($data[$key])) {
345 $data[$key] = new TaggedValue($subTag, $value);
347 $data[$key] = $value;
350 throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $realCurrentLineNbKey + 1, $this->currentLine);
357 if ($allowOverwrite || !isset($data[$key])) {
358 $data[$key] = $value;
360 throw new ParseException(sprintf('Duplicate key "%s" detected.', $key), $this->getRealCurrentLineNb() + 1, $this->currentLine);
364 $this->refs[$isRef] = $data[$key];
508 foreach ($data as $key => $value) {
509 $object->$key = $value;