1 | <?php |
||
7 | trait PipenessTrait |
||
8 | { |
||
9 | // use Filter\AppendTrait; |
||
10 | use Filter\ChunkTrait; |
||
11 | use Filter\EachTrait; |
||
12 | use Concept\EmitTrait; |
||
13 | use Filter\FilesTrait; |
||
14 | use Filter\FilterTrait; |
||
15 | use Filter\LimitTrait; |
||
16 | use Filter\MapTrait; |
||
17 | use Filter\SkipTrait; |
||
18 | use Filter\ValuesTrait; |
||
19 | use Filter\SleepTrait; |
||
20 | use Filter\InfiniteTrait; |
||
21 | use Filter\StopIfTrait; |
||
22 | |||
23 | /** |
||
24 | * @param \Iterator $iterator |
||
25 | * |
||
26 | * @return static |
||
27 | */ |
||
28 | protected function chainWith(\Iterator $iterator) |
||
34 | |||
35 | public function toArray() |
||
41 | |||
42 | /** |
||
43 | * Returns a complete iterator. |
||
44 | * (an instance of \IteratorIterator which in turn |
||
45 | * implements \OuterIterator). |
||
46 | * |
||
47 | * Use this method if you need to comply with type-hinting |
||
48 | * from external libraries |
||
49 | * |
||
50 | * @return \IteratorIterator |
||
51 | */ |
||
52 | public function toIterator() |
||
65 | |||
66 | // /** |
||
67 | // * @return \Traversable |
||
68 | // */ |
||
69 | // protected function getRoot() |
||
70 | // { |
||
71 | // return $this->getBaseOfChain($this, true); |
||
72 | // } |
||
73 | |||
74 | /** |
||
75 | * Returns the latest non pipe Iterator/Traversable in the |
||
76 | * chain. |
||
77 | * |
||
78 | * @return \Traversable |
||
79 | */ |
||
80 | public function unwrap() |
||
86 | |||
87 | public function getBaseOfChain($iterator, $pipeInstance = false) |
||
113 | |||
114 | protected function executeCallback($______callback, $______allArgs, $value, $key, $iterator) |
||
121 | } |
||
122 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: