ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
XML_RPC2_Server_Callhandler_Class Class Reference
+ Inheritance diagram for XML_RPC2_Server_Callhandler_Class:
+ Collaboration diagram for XML_RPC2_Server_Callhandler_Class:

Public Member Functions

 __construct ($className, $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

 $_className

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 90 of file Class.php.

Constructor & Destructor Documentation

XML_RPC2_Server_Callhandler_Class::__construct (   $className,
  $defaultPrefix 
)

XML_RPC2_Server_Callhandler_Class Constructor.

Creates a new call handler exporting the give static class' 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
stringThe Target class. Calls will be made on this class
stringDefault prefix to prepend to all exported methods (defaults to '')

Definition at line 115 of file Class.php.

References XML_RPC2_Server_CallHandler\addMethod().

{
$this->_className = $className;
$reflection = new ReflectionClass($className);
foreach ($reflection->getMethods() as $method) {
if ($method->isStatic() && $method->isPublic() && !$method->isAbstract() && !$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_Class::__call (   $methodName,
  $parameters 
)

__call catchall.

Delegate the method call to the target class, 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 138 of file Class.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->_className, $this->getMethod($methodName)->getInternalMethod()), $parameters);
}

+ Here is the call graph for this function:

Field Documentation

XML_RPC2_Server_Callhandler_Class::$_className
private

Definition at line 100 of file Class.php.


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