function main(ezcConsoleInput $input) { $pipe = getPipe($input->argumentDefinition["infile"]->value); $dotVisitor = new ymcPipeDotVisitor(); $pipe->accept($dotVisitor); echo $dotVisitor->getDot(); }
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); }