Engine classes are marked as deprecated and will be removed in the next release (v1.5).

This commit is contained in:
Alex Tselegidis 2020-05-12 20:49:15 +02:00
parent 2df9ae5010
commit 8795deef6b
30 changed files with 131 additions and 1 deletions

View file

@ -19,6 +19,8 @@ use \EA\Engine\Types\NonEmptyText;
* API v1 Authorization Class
*
* This class will handle the authorization procedure of the API.
*
* @deprecated
*/
class Authorization {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1;
* API v1 Exception Class
*
* This exception variation will hold the information needed for exception handling in the API.
*
* @deprecated
*/
class Exception extends \Exception {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Admins Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Admins implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Appointments Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Appointments implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Categories Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Categories implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Customers Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Customers implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Parsers Interface
*
* Every parser needs the "encode" and "decode" methods.
*
* @deprecated
*/
interface ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Providers Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Providers implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Secretaries Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Secretaries implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Services Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Services implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Settings Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Settings implements ParsersInterface {
/**

View file

@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
* Unavailabilities Parser
*
* This class will handle the encoding and decoding from the API requests.
*
* @deprecated
*/
class Unavailabilities implements ParsersInterface {
/**

View file

@ -20,6 +20,8 @@ namespace EA\Engine\Api\V1\Processors;
* easier to apply some custom filtering in order to get the required results.
*
* @todo Implement this processor class.
*
* @deprecated
*/
class Filter implements ProcessorsInterface {
/**

View file

@ -22,6 +22,8 @@ namespace EA\Engine\Api\V1\Processors;
*
* Make sure that the response parameter is a sequential array and not a single entry by the time this
* processor is executed.
*
* @deprecated
*/
class Minimize implements ProcessorsInterface {
/**

View file

@ -22,6 +22,8 @@ namespace EA\Engine\Api\V1\Processors;
*
* Make sure that the response parameter is a sequential array and not a single entry by the time this
* processor is executed.
*
* @deprecated
*/
class Paginate implements ProcessorsInterface {
/**

View file

@ -13,6 +13,13 @@
namespace EA\Engine\Api\V1\Processors;
/**
* Interface ProcessorsInterface
*
* @deprecated
*
* @package EA\Engine\Api\V1\Processors
*/
interface ProcessorsInterface {
public static function process(array &$response);
}

View file

@ -19,6 +19,8 @@ namespace EA\Engine\Api\V1\Processors;
* This class will search the response with the "q" GET parameter and only provide the entries
* that match the keyword. Make sure that the response parameter is a sequential array and not
* a single entry by the time this processor is executed.
*
* @deprecated
*/
class Search implements ProcessorsInterface {
/**

View file

@ -19,6 +19,8 @@ namespace EA\Engine\Api\V1\Processors;
* This class will sort the response array with the provided GET parameters. Make sure that the
* response parameter is a sequential array and not a single entry by the time this processor is
* executed.
*
* @deprecated
*/
class Sort implements ProcessorsInterface {
/**

View file

@ -18,6 +18,8 @@ namespace EA\Engine\Api\V1;
*
* This class handles the common request handling before the data are manipulated and
* returned back with the Response class.
*
* @deprecated
*/
class Request {
/**

View file

@ -25,6 +25,8 @@ use EA\Engine\Types\NonEmptyText;
* $parser = new \EA\Engine\Api\V1\Parsers\Appointments;
* $response = new \EA\Engine\Api\V1\Response($data);
* $response->format($parser)->search()->sort()->paginate()->minimize()->output();
*
* @deprecated
*/
class Response {
/**

View file

@ -24,6 +24,8 @@ use \EA\Engine\Types\Email as EmailAddress;
* This library handles all the notification email deliveries on the system.
*
* Important: The email configuration settings are located at: /application/config/email.php
*
* @deprecated
*/
class Email {
/**

View file

@ -13,7 +13,18 @@
namespace EA\Engine\Types;
/**
* Class Boolean
*
* @deprecated
*
* @package EA\Engine\Types
*/
class Boolean extends Type {
/**
* @param mixed $value
* @return bool
*/
protected function _validate($value)
{
return is_bool($value);

View file

@ -13,7 +13,19 @@
namespace EA\Engine\Types;
/**
* Class Decimal
*
* @deprecated
*
* @package EA\Engine\Types
*/
class Decimal extends Type {
/**
* @param mixed $value
* @return bool
*/
protected function _validate($value)
{
return is_float($value);

View file

@ -13,6 +13,13 @@
namespace EA\Engine\Types;
/**
* Class Email
*
* @deprecated
*
* @package EA\Engine\Types
*/
class Email extends NonEmptyText {
protected function _validate($value)
{

View file

@ -13,7 +13,18 @@
namespace EA\Engine\Types;
/**
* Class Integer
*
* @deprecated
*
* @package EA\Engine\Types
*/
class Integer extends Type {
/**
* @param mixed $value
* @return bool
*/
protected function _validate($value)
{
return is_numeric($value) && ! is_float($value);

View file

@ -13,7 +13,18 @@
namespace EA\Engine\Types;
/**
* Class NonEmptyText
*
* @deprecated
*
* @package EA\Engine\Types
*/
class NonEmptyText extends Text {
/**
* @param mixed $value
* @return bool
*/
protected function _validate($value)
{
return parent::_validate($value) && $value !== '';

View file

@ -13,6 +13,13 @@
namespace EA\Engine\Types;
/**
* Class Text
*
* @deprecated
*
* @package EA\Engine\Types
*/
class Text extends Type {
protected function _validate($value)
{

View file

@ -16,6 +16,8 @@ namespace EA\Engine\Types;
/**
* Abstract Type Class
*
* @deprecated
*
* This class needs to be extended by the type classes which must implement the validation logic.
*/
abstract class Type {

View file

@ -13,7 +13,18 @@
namespace EA\Engine\Types;
/**
* Class UnsignedInteger
*
* @deprecated
*
* @package EA\Engine\Types
*/
class UnsignedInteger extends Integer {
/**
* @param mixed $value
* @return bool
*/
protected function _validate($value)
{
return parent::_validate($value) && $value > -1;

View file

@ -13,7 +13,18 @@
namespace EA\Engine\Types;
/**
* Class Url
*
* @deprecated
*
* @package EA\Engine\Types
*/
class Url extends NonEmptyText {
/**
* @param mixed $value
* @return bool
*/
protected function _validate($value)
{
return parent::_validate($value) && filter_var($value, FILTER_VALIDATE_URL);