Ejemplo n.º 1
0
function main(ezcConsoleInput $input)
{
    $pipe = getPipe($input->argumentDefinition["infile"]->value);
    $dotVisitor = new ymcPipeDotVisitor();
    $pipe->accept($dotVisitor);
    echo $dotVisitor->getDot();
}
Ejemplo n.º 2
0
 public static function through($data, $through)
 {
     if (is_array($through)) {
         foreach ($through as $pipe) {
             $data = pipe::through($data, $pipe);
         }
         return $data;
     }
     $pipe_function = getPipe($through);
     return $pipe_function($data);
 }