| 1 | <?php |
||
| 24 | final class UseStmtCollection implements IteratorAggregate |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @var Use_[] |
||
| 28 | */ |
||
| 29 | private $nodes = []; |
||
| 30 | |||
| 31 | public function add(Use_ $node) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Finds the statements matching the given name. |
||
| 38 | * |
||
| 39 | * $name = 'Foo'; |
||
| 40 | * |
||
| 41 | * use X; |
||
| 42 | * use Bar\Foo; |
||
| 43 | * use Y; |
||
| 44 | * |
||
| 45 | * will return the use statement for `Bar\Foo`. |
||
| 46 | * |
||
| 47 | * @param string $name |
||
| 48 | * |
||
| 49 | * @return null|Name |
||
| 50 | */ |
||
| 51 | public function findStatementForName(string $name): ?Name |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @inheritdoc |
||
| 70 | */ |
||
| 71 | public function getIterator() |
||
| 75 | } |
||
| 76 |