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

Breadcrumb

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

function Method::makeAbstract

Makes the method abstract.

Return value

$this The builder instance (for fluid interface)

File

vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php, line 80

Class

Method

Namespace

PhpParser\Builder

Code

public function makeAbstract() {
    if (!empty($this->stmts)) {
        throw new \LogicException('Cannot make method with statements abstract');
    }
    $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT);
    $this->stmts = null;
    // abstract methods don't have statements
    return $this;
}

API Navigation

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