Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Parser.php

function Parser::parseClassBody

Parses the class body

Return value

Node\ClassBody|null

1 call to Parser::parseClassBody()
Parser::parseClassTail in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses the code that comes after the class keyword and class name. The return value is an array where the first item is the extended class, if any, and the second value is the class body

File

vendor/mck89/peast/lib/Peast/Syntax/Parser.php, line 1756

Class

Parser
Parser class

Namespace

Peast\Syntax

Code

protected function parseClassBody() {
    $body = $this->parseClassElementList();
    $node = $this->createNode("ClassBody", $body ?: $this->scanner
        ->getPosition());
    if ($body) {
        $node->setBody($body);
    }
    return $this->completeNode($node);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal