**/ class twIf_RPC_Multi extends twIf_RPC { const ALLOW_COMPONENT_LIST = false; const ALLOW_FUNCTION_LIST = false; private $Components = array (); private $Functions = array (); function __construct ($Method = null) { parent::__construct ($Method); $this->registerFunction ('listComponents', array ($this, 'rpcListComponents'), array ()); } protected function addMulti ($Component, $Class, $Expose = true) { $this->Components [$Component] = array ( 'Exposed' => $Expose, 'Class' => $Class, 'Name' => $Component, ); } public function rpcListComponents () { $out = array (); foreach ($this->Components as $Name=>$Data) if ($Data ['Exposed']) $out [] = array ( 'name' => $Name; ); return $out; } } ?>