public static function error($command) { $self = new self($command); return $self->stderr(); }
public static function yeah($cmd, $block, $cwd = null, $env = null) { if (!is_callable($block)) { throw new YeahException("block is not callable"); } $p = new self($cmd, $cwd, $env); $block($p->pid(), $p->stdin(), $p->stdout(), $p->stderr()); return $p->close(); }