ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
XML_RPC2_Server_Callhandler_Instance Class Reference
+ Inheritance diagram for XML_RPC2_Server_Callhandler_Instance:
+ Collaboration diagram for XML_RPC2_Server_Callhandler_Instance:

Public Member Functions

 __construct ($instance, $defaultPrefix)
 XML_RPC2_Server_Callhandler_Class Constructor.
 __call ($methodName, $parameters)
 __call catchall.
- Public Member Functions inherited from XML_RPC2_Server_CallHandler
 getMethods ()
 methods getter
 getMethod ($name)
 method getter

Private Attributes

 $_instance

Additional Inherited Members

- Protected Member Functions inherited from XML_RPC2_Server_CallHandler
 addMethod (XML_RPC2_Server_Method $method)
 method appender
- Protected Attributes inherited from XML_RPC2_Server_CallHandler
 $methods = array()

Detailed Description

Definition at line 88 of file Instance.php.

Constructor & Destructor Documentation

XML_RPC2_Server_Callhandler_Instance::__construct (   $instance,
  $defaultPrefix 
)

XML_RPC2_Server_Callhandler_Class Constructor.

Creates a new call handler exporting the given object methods

Before using this constructor, take a look at XML_RPC2_Server::create. The factory method is usually a quicker way of instantiating the server and its call handler.

See Also
XML_RPC2_Server::create()
Parameters
objectThe Target object. Calls will be made on this instance
stringDefault prefix to prepend to all exported methods (defaults to '')

Definition at line 113 of file Instance.php.

References XML_RPC2_Server_CallHandler\addMethod().

{
$this->_instance = $instance;
$reflection = new ReflectionClass(get_class($instance));
foreach ($reflection->getMethods() as $method) {
if (!$method->isStatic() && $method->isPublic() && !$method->isConstructor())
{
$candidate = new XML_RPC2_Server_Method($method, $defaultPrefix);
if (!$candidate->isHidden()) $this->addMethod($candidate);
}
}
}

+ Here is the call graph for this function:

Member Function Documentation

XML_RPC2_Server_Callhandler_Instance::__call (   $methodName,
  $parameters 
)

__call catchall.

Delegate the method call to the target object, and return its result

Parameters
stringName of method to call
arrayArray of parameters for call
Returns
mixed Whatever the target method returned

Definition at line 136 of file Instance.php.

References XML_RPC2_Server_CallHandler\getMethod(), and XML_RPC2_Server_CallHandler\getMethods().

{
if (!array_key_exists($methodName, $this->getMethods())) {
throw new XML_RPC2_UnknownMethodException("Method $methodName is not exported by this server");
}
return call_user_func_array(array($this->_instance, $this->getMethod($methodName)->getInternalMethod()), $parameters);
}

+ Here is the call graph for this function:

Field Documentation

XML_RPC2_Server_Callhandler_Instance::$_instance
private

Definition at line 98 of file Instance.php.


The documentation for this class was generated from the following file: