summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2011-09-08 17:17:52 +0000
committerUrban Müller2011-09-08 17:17:52 +0000
commitf28848f9922745445cf3fe8d51b4f3351f2c2d5c (patch)
tree63717fee4e7a83abe3e063478c5ccc2fbeb110f6
parent42a644847dc2091485d8980e82986d9c155016ef (diff)
downloaditools-f28848f9922745445cf3fe8d51b4f3351f2c2d5c.tar.gz
itools-f28848f9922745445cf3fe8d51b4f3351f2c2d5c.tar.bz2
itools-f28848f9922745445cf3fe8d51b4f3351f2c2d5c.zip
document __call
-rw-r--r--it_pipe.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it_pipe.class b/it_pipe.class
index 3dbf313..bed5537 100644
--- a/it_pipe.class
+++ b/it_pipe.class
@@ -21,9 +21,9 @@ function __construct($p = array())
$this->lines = array_merge((array)$this->lines, file($fn, FILE_IGNORE_NEW_LINES));
}
-#
-# Magic functions
-#
+/**
+ * Apply any php function to every line in pipe. Pass line as first arg except with some functions (e.g. explode)
+ */
function __call($name, $params)
{
list($parampos) = self::$lastargfunc[$name] ? array(count($params)) : array(0, array_unshift($params, ""));