Method | Description | |
---|---|---|
__clone ( ) | Prevents from singleton cloning. | |
__destruct ( ) | Destroys a class instance. | |
enableLogging ( string $filename, callable $callback = null ) : self | Turns on logging. | |
getInstance ( ) : self | Returns class instance. | |
process ( ) | Processes a request and sends a RPC response. | |
registerClass ( string $class, boolean $useFullName = true ) : self | Registers class public methods. | |
registerFunc ( string $func ) : self | Registers given function. | |
registerMethod ( string $class, string $method, boolean $useFullName = true ) : self | Registers given method of given class. |
Method | Description | |
---|---|---|
__construct ( ) | Creates a class instance. | |
call ( string $method, array $params ) : mixed | Calls a server method with given parameters. | |
register ( string $func ) | Actually registers a function to a server method. |
Method | Description | |
---|---|---|
log ( string $method, array $params, mixed $result ) | Logs a request. |
public enableLogging ( string $filename, callable $callback = null ) : self | ||
$filename | string | Log file path. |
$callback | callable | Function to be called prior to logging a message. |
return | self |
public static getInstance ( ) : self | ||
return | self |
abstract public process ( ) |
public registerClass ( string $class, boolean $useFullName = true ) : self | ||
$class | string | Class name |
$useFullName | boolean | Register with class name |
return | self |
public registerFunc ( string $func ) : self | ||
$func | string | Function name |
return | self |