summaryrefslogtreecommitdiff
path: root/it_pipe.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_pipe.class')
-rw-r--r--it_pipe.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it_pipe.class b/it_pipe.class
index 967cc77..3153dae 100644
--- a/it_pipe.class
+++ b/it_pipe.class
@@ -42,7 +42,7 @@ function __call($name, $params)
function __toString()
{
- return is_array($this->lines) ? join("\n", $this->lines) . "\n" : "";
+ return is_array($this->lines) ? implode("\n", $this->lines) . "\n" : "";
}
@@ -117,7 +117,7 @@ function utf8()
function cut($picks)
{
foreach ($this->lines as $idx => $line)
- $this->lines[$idx] = join("\t", it::filter_keys(explode("\t", $line), $picks, ['reorder' => true]));
+ $this->lines[$idx] = implode("\t", it::filter_keys(explode("\t", $line), $picks, ['reorder' => true]));
return $this;
}
@@ -243,7 +243,7 @@ function pipe($cmd, ...$args)
$descriptors = array(0 => array("pipe", "r"), 1 => array("pipe", "w"));
$process = proc_open($cmd, $descriptors, $pipes);
- fwrite($pipes[0], join("\n", $this->lines) . ($this->lines ? "\n" :""));
+ fwrite($pipes[0], implode("\n", $this->lines) . ($this->lines ? "\n" :""));
fclose($pipes[0]);
$out = stream_get_contents($pipes[1]);
@@ -261,7 +261,7 @@ function pipe($cmd, ...$args)
*/
function write($fn = null, $append = false)
{
- it::file_put_contents($fn === null ? "php://stdout" : $fn, $this->lines ? join("\n", $this->lines) . "\n" : "", $append ? FILE_APPEND : 0);
+ it::file_put_contents($fn === null ? "php://stdout" : $fn, $this->lines ? implode("\n", $this->lines) . "\n" : "", $append ? FILE_APPEND : 0);
return $this;
}