Pipes
Pipes are classes that given one input, they return a collection of outputs.
They are multi-purpose classes that are intended to be piped.
Usage
Extractors are defined to have a specific input type
and a specific output type
. They can be the same, or they can be different, but they will be predictable.
As you can see, the type of the MatchCollection changes in between extractions.
Also, the items on the collection also changes. Before the ReflectionMethodExtractor, the collection had only ReflectionClasses. After it, it has ReflectionMethod classes, one per public method per class.
If a class has multiple public methods, it will increase the output. If it has none, it will decrease the output.
Closure Pipe
You don't need a class to be able to pipe.
More specific filters
If you would like to simply reject or filter some matches, you can use filter
and reject
instead of making a pipe.
Last updated