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

Breadcrumb

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

function Property::getNode

Returns the built class node.

Return value

Stmt\Property The built property node

Overrides Builder::getNode

File

vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php, line 207

Class

Property

Namespace

PhpParser\Builder

Code

public function getNode() : PhpParser\Node {
    if ($this->flags & Modifiers::ABSTRACT && !$this->hooks) {
        throw new PhpParser\Error('Only hooked properties may be declared abstract');
    }
    return new Stmt\Property($this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [
        new Node\PropertyItem($this->name, $this->default),
    ], $this->attributes, $this->type, $this->attributeGroups, $this->hooks);
}

API Navigation

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