| 1 | <?php |
||
| 8 | class Pipe implements IteratorAggregate |
||
| 9 | { |
||
| 10 | use PipenessTrait; |
||
| 11 | |||
| 12 | protected $var; |
||
| 13 | |||
| 14 | public function __construct(&$var = null) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * This method is implemented just because it's required by the |
||
| 29 | * \IteratorAggregate interface. |
||
| 30 | * |
||
| 31 | * Returns an instance of the last array/Traversable of the chain |
||
| 32 | * Don't use this method: it won't return a Pipe instance: |
||
| 33 | * no more chaining magic. |
||
| 34 | * It may very well be a plain array. |
||
| 35 | * |
||
| 36 | * If you need an iterator, use toIterator() instead. |
||
| 37 | * |
||
| 38 | * @return array|\Traversable |
||
| 39 | */ |
||
| 40 | public function getIterator() |
||
| 44 | } |
||
| 45 |