XRL
latest
Simple XML-RPC Library (both client and server)
|
Interface for something that can be called. More...
Public Member Functions | |
__invoke () | |
__toString () | |
getCallable () | |
getReflector () | |
getRepresentation () | |
Interface for something that can be called.
This interface provides a generic way to define something that can be invoked to execute some code, like a function, a method (with the usual array representation used by PHP), a closure, etc.
Definition at line 24 of file CallableInterface.php.
fpoirotte\XRL\CallableInterface::__invoke | ( | ) |
Implementation of the __invoke() magic method.
This method is present only for forward-compatibility and because it turns instances of fpoirotte::XRL::CallableInterface into callables themselves (ain't that neat?).
fpoirotte\XRL\CallableInterface::__toString | ( | ) |
Alias for fpoirotte::XRL::CallableInterface::getRepresentation().
string | Human representation of this callable. |
Implemented in fpoirotte\XRL\CallableObject.
fpoirotte\XRL\CallableInterface::getCallable | ( | ) |
Returns the callable object in its raw form (as used by PHP).
string | The name of the function this callable represents, which can be either a core function, a user-defined function, or the result of a call to create_function(). |
array | An array whose contents matches the definition of a PHP callback, that is:
|
object | Either a Closure object or an instance of a class that implements the __invoke() magic method. |
Implemented in fpoirotte\XRL\CallableObject.
fpoirotte\XRL\CallableInterface::getReflector | ( | ) |
Get a reflection objets for the function/method/object represented by this callable.
Reflector | Reflection object for this callable's inner PHP callback. |
Implemented in fpoirotte\XRL\CallableObject.
fpoirotte\XRL\CallableInterface::getRepresentation | ( | ) |
Returns a human representation of this callable. For (anonymous) functions, this is a string containing the name of that function. For methods and classes that implement the __invoke() magic method (including Closures), this is a string of the form "ClassName::methodname".
string | Human representation of this callable. |
Implemented in fpoirotte\XRL\CallableObject.