diff options
| author | Hash9 <hash9@users.sourceforge.net> | 2006-08-20 22:39:22 +0000 |
|---|---|---|
| committer | Hash9 <hash9@users.sourceforge.net> | 2006-08-20 22:39:22 +0000 |
| commit | 63de8cae6a1b19f5c56c67b4ad80506e3340c99a (patch) | |
| tree | 0492ff50b390ab38691c57d3704bfa41a9816e2a | |
| parent | acb28ac4c486c655bb2a4c686783f0efbc037c12 (diff) | |
| download | liberty-63de8cae6a1b19f5c56c67b4ad80506e3340c99a.tar.gz liberty-63de8cae6a1b19f5c56c67b4ad80506e3340c99a.tar.bz2 liberty-63de8cae6a1b19f5c56c67b4ad80506e3340c99a.zip | |
add invokeServiceFunctionR call until a generalisation can be desided
| -rwxr-xr-x | LibertySystem.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/LibertySystem.php b/LibertySystem.php index bc095da..9d2a316 100755 --- a/LibertySystem.php +++ b/LibertySystem.php @@ -3,7 +3,7 @@ * System class for handling the liberty package * * @package liberty -* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.38 2006/08/18 17:37:13 wjames5 Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.39 2006/08/20 22:39:22 hash9 Exp $ * @author spider <spider@steelsun.com> */ @@ -385,6 +385,28 @@ class LibertySystem extends LibertyBase { return $ret; } + /** + * Return an associate array of the non empty return values of all the functions with the given arguments + * + * @param $pFunction the liberty name of the function to invoke + * @param $pArgs an array of arguments to the function + * @return array an associate array of the non empty return values + */ + function invokeServiceFunctionR($pFunction,$pArgs) { + $ret = array(); + if( $funcs = $this->getServiceValues( $pFunction ) ) { + foreach( $funcs as $serv => $func ) { + if( function_exists( $func ) ) { + $v = call_user_func_array($func,$pArgs); + if (!empty($v)) { + $ret[$serv] =$v; + } + } + } + } + return $ret; + } + // ****************************** Miscellaneous Functions /** * Get the URL to the icon for the mime type passed in. This should probably check for files of multiple image types instead of just jpg |
