| 1 | <?php |
||
| 9 | class Trait_ extends Declaration |
||
| 10 | { |
||
| 11 | protected $name; |
||
| 12 | protected $properties = array(); |
||
| 13 | protected $methods = array(); |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Creates an interface builder. |
||
| 17 | * |
||
| 18 | * @param string $name Name of the interface |
||
| 19 | */ |
||
| 20 | public function __construct($name) { |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Adds a statement. |
||
| 26 | * |
||
| 27 | * @param Stmt|PhpParser\Builder $stmt The statement to add |
||
| 28 | * |
||
| 29 | * @return $this The builder instance (for fluid interface) |
||
| 30 | */ |
||
| 31 | public function addStmt($stmt) { |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Returns the built trait node. |
||
| 47 | * |
||
| 48 | * @return Stmt\Trait_ The built interface node |
||
| 49 | */ |
||
| 50 | public function getNode() { |
||
| 55 | } |
||
| 56 |