mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
Add some warnings to RequestProcessor class
Request/response methods not abstract any more. To prevent direct call(without overloading) add error with E_USER_WARNING level into this methods.
This commit is contained in:
parent
551be06d9e
commit
de2f60bfdc
@ -379,6 +379,44 @@ abstract class RequestProcessor {
|
||||
return empty($results['errorCode']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends synchronous request
|
||||
*
|
||||
* @param array $request The 'request' array. See Mibew API for details
|
||||
* @return mixed response array or boolean false on failure
|
||||
*/
|
||||
protected function sendSyncRequest($request) {
|
||||
trigger_error('Method sendSyncRequest does not implement!', E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends asynchronous request
|
||||
*
|
||||
* @param array $request The 'request' array. See Mibew API for details
|
||||
* @return boolean true on success or false on failure
|
||||
*/
|
||||
protected function sendAsyncRequest($request) {
|
||||
trigger_error('Method sendAsyncRequest does not implement!', E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends synchronous responses
|
||||
*
|
||||
* @param array $responses An array of the 'Request' arrays. See Mibew API for details
|
||||
*/
|
||||
protected function sendSyncResponses($responses) {
|
||||
trigger_error('Method sendSyncResponses does not implement!', E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends asynchronous responses
|
||||
*
|
||||
* @param array $responses An array of the 'Request' arrays. See Mibew API for details
|
||||
*/
|
||||
protected function sendAsyncResponses($responses) {
|
||||
trigger_error('Method sendAsyncResponses does not implement!', E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns an instance of the MibewAPI class.
|
||||
*
|
||||
@ -411,36 +449,6 @@ abstract class RequestProcessor {
|
||||
* @see RequestProcessor::registerEvents()
|
||||
*/
|
||||
protected abstract function processorCall(&$func);
|
||||
|
||||
/**
|
||||
* Sends synchronous request
|
||||
*
|
||||
* @param array $request The 'request' array. See Mibew API for details
|
||||
* @return mixed response array or boolean false on failure
|
||||
*/
|
||||
protected abstract function sendSyncRequest($request);
|
||||
|
||||
/**
|
||||
* Sends asynchronous request
|
||||
*
|
||||
* @param array $request The 'request' array. See Mibew API for details
|
||||
* @return boolean true on success or false on failure
|
||||
*/
|
||||
protected abstract function sendAsyncRequest($request);
|
||||
|
||||
/**
|
||||
* Sends synchronous responses
|
||||
*
|
||||
* @param array $responses An array of the 'Request' arrays. See Mibew API for details
|
||||
*/
|
||||
protected abstract function sendSyncResponses($responses);
|
||||
|
||||
/**
|
||||
* Sends asynchronous responses
|
||||
*
|
||||
* @param array $responses An array of the 'Request' arrays. See Mibew API for details
|
||||
*/
|
||||
protected abstract function sendAsyncResponses($responses);
|
||||
}
|
||||
|
||||
class RequestProcessorException extends Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user