mirror of
https://github.com/Mibew/mibew.git
synced 2025-05-10 22:23:06 +03:00
Rename \Mibew\RequestProcessor\Processor class to AbstractProcessor
This commit is contained in:
parent
a5ec847ed1
commit
93f5b82dec
@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor;
|
|||||||
// Import namespaces and classes of the core
|
// Import namespaces and classes of the core
|
||||||
use Mibew\Database;
|
use Mibew\Database;
|
||||||
use Mibew\EventDispatcher;
|
use Mibew\EventDispatcher;
|
||||||
use Mibew\RequestProcessor\Exception\ProcessorException;
|
use Mibew\RequestProcessor\Exception\AbstractProcessorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements abstract class for request processing
|
* Implements abstract class for request processing
|
||||||
@ -90,9 +90,9 @@ use Mibew\RequestProcessor\Exception\ProcessorException;
|
|||||||
* }
|
* }
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @see \Mibew\RequestProcessor\Processor::__construct()
|
* @see \Mibew\RequestProcessor\AbstractProcessor::__construct()
|
||||||
*/
|
*/
|
||||||
abstract class Processor
|
abstract class AbstractProcessor
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Instance of the MibewAPI class
|
* Instance of the MibewAPI class
|
||||||
@ -279,9 +279,9 @@ abstract class Processor
|
|||||||
try {
|
try {
|
||||||
// Check functions to call
|
// Check functions to call
|
||||||
if (!is_array($functions)) {
|
if (!is_array($functions)) {
|
||||||
throw new ProcessorException(
|
throw new AbstractProcessorException(
|
||||||
'#1 argument must be an array!',
|
'#1 argument must be an array!',
|
||||||
ProcessorException::WRONG_ARGUMENTS
|
AbstractProcessorException::WRONG_ARGUMENTS
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
foreach ($functions as $function) {
|
foreach ($functions as $function) {
|
||||||
@ -495,7 +495,7 @@ abstract class Processor
|
|||||||
if (is_callable(array($this, $method_name))) {
|
if (is_callable(array($this, $method_name))) {
|
||||||
try {
|
try {
|
||||||
$func['results'] = $this->$method_name($func['arguments']);
|
$func['results'] = $this->$method_name($func['arguments']);
|
||||||
} catch (ProcessorException $e) {
|
} catch (AbstractProcessorException $e) {
|
||||||
$func['results'] = array(
|
$func['results'] = array(
|
||||||
'errorCode' => $e->getCode(),
|
'errorCode' => $e->getCode(),
|
||||||
'errorMessage' => $e->getMessage(),
|
'errorMessage' => $e->getMessage(),
|
@ -24,7 +24,7 @@ use Mibew\Database;
|
|||||||
* Base class for all request processors that interact with JavaScript
|
* Base class for all request processors that interact with JavaScript
|
||||||
* applications at the client side.
|
* applications at the client side.
|
||||||
*/
|
*/
|
||||||
abstract class ClientSideProcessor extends Processor
|
abstract class ClientSideProcessor extends AbstractProcessor
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
namespace Mibew\RequestProcessor\Exception;
|
namespace Mibew\RequestProcessor\Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for {@link \Mibew\RequestProcessor\Processor} exceptions.
|
* Class for {@link \Mibew\RequestProcessor\AbstractProcessor} exceptions.
|
||||||
*/
|
*/
|
||||||
class ProcessorException extends \Exception
|
class AbstractProcessorException extends \Exception
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Wrong function arguments
|
* Wrong function arguments
|
@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor\Exception;
|
|||||||
/**
|
/**
|
||||||
* Class for {@link \Mibew\RequestProcessor\InviteRequestProcessor} exceptions
|
* Class for {@link \Mibew\RequestProcessor\InviteRequestProcessor} exceptions
|
||||||
*/
|
*/
|
||||||
class InviteProcessorException extends ProcessorException
|
class InviteProcessorException extends AbstractProcessorException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Operator is not logged in
|
* Operator is not logged in
|
||||||
|
@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor\Exception;
|
|||||||
/**
|
/**
|
||||||
* Class for {@link \Mibew\RequestProcessor\ThreadProcessor} exceptions.
|
* Class for {@link \Mibew\RequestProcessor\ThreadProcessor} exceptions.
|
||||||
*/
|
*/
|
||||||
class ThreadProcessorException extends ProcessorException
|
class ThreadProcessorException extends AbstractProcessorException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 'recipient' argument is not set
|
* 'recipient' argument is not set
|
||||||
|
@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor\Exception;
|
|||||||
/**
|
/**
|
||||||
* Class for {@link \Mibew\RequestProcessor\UsersProcessor} exceptions
|
* Class for {@link \Mibew\RequestProcessor\UsersProcessor} exceptions
|
||||||
*/
|
*/
|
||||||
class UsersProcessorException extends ProcessorException
|
class UsersProcessorException extends AbstractProcessorException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Operator is not logged in
|
* Operator is not logged in
|
||||||
|
Loading…
Reference in New Issue
Block a user