function DocParser::FieldAssignment

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::FieldAssignment()
  2. 8.9.x core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::FieldAssignment()
  3. 10 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 1078

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.