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