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

Breadcrumb

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

function ClassLike::getMethods

Gets all methods defined directly in this class/interface/trait

Return value

ClassMethod[]

File

vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php, line 83

Class

ClassLike

Namespace

PhpParser\Node\Stmt

Code

public function getMethods() : array {
    $methods = [];
    foreach ($this->stmts as $stmt) {
        if ($stmt instanceof ClassMethod) {
            $methods[] = $stmt;
        }
    }
    return $methods;
}

API Navigation

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