You are here

private function DocParser::FieldAssignment in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::FieldAssignment()
  2. 9 core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::FieldAssignment()

FieldAssignment ::= FieldName "=" PlainValue FieldName ::= identifier

Return value

array

1 call to DocParser::FieldAssignment()
DocParser::Value in core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php
Value ::= PlainValue | FieldAssignment

File

core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php, line 1054
This class is a near-copy of Doctrine\Common\Annotations\DocParser, which is part of the Doctrine project: <http://www.doctrine-project.org>. It was copied from version 1.2.7.

Class

DocParser
A parser for docblock annotations.

Namespace

Drupal\Component\Annotation\Doctrine

Code

private function FieldAssignment() {
  $this
    ->match(DocLexer::T_IDENTIFIER);
  $fieldName = $this->lexer->token['value'];
  $this
    ->match(DocLexer::T_EQUALS);
  $item = new \stdClass();
  $item->name = $fieldName;
  $item->value = $this
    ->PlainValue();
  return $item;
}