diff options
author | Urban Müller | 2016-04-08 17:35:46 +0200 |
---|---|---|
committer | Urban Müller | 2016-04-08 17:35:46 +0200 |
commit | dc81d51d8880222a8bb91d9e3c923ecd5962a8e6 (patch) | |
tree | e10ad589a2f164333f10daca53bbafcfc91a838a | |
parent | 38bfee9efe3e04d4ae6a1b3e4e7fd89032175682 (diff) | |
download | itools-dc81d51d8880222a8bb91d9e3c923ecd5962a8e6.tar.gz itools-dc81d51d8880222a8bb91d9e3c923ecd5962a8e6.tar.bz2 itools-dc81d51d8880222a8bb91d9e3c923ecd5962a8e6.zip |
docs: better usage example, no copy/paste
-rw-r--r-- | it.class | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -534,7 +534,7 @@ static function filter_keys($array, $keys, $p = array()) * Construct shell command using it::shell_command, log it, execute it and return output as string. * {keyword} quotes and inserts value from assoc array like ET() * {0} .. {n} quotes and inserts positional arguments - * {-opts} takes an array and inserts options a la it_html attributes (value, true, false or null) + * {-opts} array of opts => {value,true,false,null}: it::exec('ls {-opts}', ['-opts' => ["-l" => true]]); * @param $cmd Format string with {keywords} a la ET() * @param $values (zero, one or more arrays can be passed) * @return output of command. shell errors not detectable, see error_log in /www/server/logs @@ -554,12 +554,8 @@ static function exec(/* $cmd, $values1 = array(), ... */) /** * Construct shell command using it::shell_command, log it, execute it and return exit code. - * stdout/stderr is forwarded to stdout/stderror of calling script - * {keyword} quotes and inserts value from assoc array like ET() - * {0} .. {n} quotes and inserts positional arguments - * {-opts} array of opts => {value,true,false,null}: it::exec('ls {-opts}', ['-opts' => ["-l" => true]]); - * @param $cmd Format string with {keywords} a la ET() - * @param $values (zero, one or more arrays can be passed) + * stdout/stderr is forwarded to stdout/stderror of calling script. + * See ::exec above for usage * @return exit code of command. */ static function system(/* $cmd, $values1 = array(), ... */) |