1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2025-01-22 05:41:23 +01:00
Tom Rochette 1366e833a1 Move getMethods() to new ClassLike node
Class_, Interface_ and Trait_ extend the ClassLike node, which
provides the getMethods() method.
2015-01-31 22:59:38 +01:00

30 lines
632 B
PHP

<?php
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
/**
* @property string $name Name
* @property Node[] $stmts Statements
*/
class Trait_ extends ClassLike
{
/**
* Constructs a trait node.
*
* @param string $name Name
* @param Node[] $stmts Statements
* @param array $attributes Additional attributes
*/
public function __construct($name, array $stmts = array(), array $attributes = array()) {
parent::__construct(
array(
'name' => $name,
'stmts' => $stmts,
),
$attributes
);
}
}