mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-12-12 09:29:47 +01:00
24 lines
462 B
PHP
24 lines
462 B
PHP
|
<?php
|
||
|
|
||
|
namespace PhpParser\Node\Stmt;
|
||
|
|
||
|
use PhpParser\Node;
|
||
|
|
||
|
/**
|
||
|
* Class, interface or trait.
|
||
|
*
|
||
|
* @property string $name Name
|
||
|
* @property Node[] $stmts Statements
|
||
|
*/
|
||
|
abstract class ClassLike extends Node\Stmt {
|
||
|
public function getMethods() {
|
||
|
$methods = array();
|
||
|
foreach ($this->stmts as $stmt) {
|
||
|
if ($stmt instanceof ClassMethod) {
|
||
|
$methods[] = $stmt;
|
||
|
}
|
||
|
}
|
||
|
return $methods;
|
||
|
}
|
||
|
}
|