mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-21 23:42:21 +03:00
Engine classes are marked as deprecated and will be removed in the next release (v1.5).
This commit is contained in:
parent
2df9ae5010
commit
8795deef6b
30 changed files with 131 additions and 1 deletions
|
@ -19,6 +19,8 @@ use \EA\Engine\Types\NonEmptyText;
|
||||||
* API v1 Authorization Class
|
* API v1 Authorization Class
|
||||||
*
|
*
|
||||||
* This class will handle the authorization procedure of the API.
|
* This class will handle the authorization procedure of the API.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Authorization {
|
class Authorization {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1;
|
||||||
* API v1 Exception Class
|
* API v1 Exception Class
|
||||||
*
|
*
|
||||||
* This exception variation will hold the information needed for exception handling in the API.
|
* This exception variation will hold the information needed for exception handling in the API.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Exception extends \Exception {
|
class Exception extends \Exception {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Admins Parser
|
* Admins Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Admins implements ParsersInterface {
|
class Admins implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Appointments Parser
|
* Appointments Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Appointments implements ParsersInterface {
|
class Appointments implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Categories Parser
|
* Categories Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Categories implements ParsersInterface {
|
class Categories implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Customers Parser
|
* Customers Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Customers implements ParsersInterface {
|
class Customers implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Parsers Interface
|
* Parsers Interface
|
||||||
*
|
*
|
||||||
* Every parser needs the "encode" and "decode" methods.
|
* Every parser needs the "encode" and "decode" methods.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
interface ParsersInterface {
|
interface ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Providers Parser
|
* Providers Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Providers implements ParsersInterface {
|
class Providers implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Secretaries Parser
|
* Secretaries Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Secretaries implements ParsersInterface {
|
class Secretaries implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Services Parser
|
* Services Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Services implements ParsersInterface {
|
class Services implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Settings Parser
|
* Settings Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Settings implements ParsersInterface {
|
class Settings implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
* Unavailabilities Parser
|
* Unavailabilities Parser
|
||||||
*
|
*
|
||||||
* This class will handle the encoding and decoding from the API requests.
|
* This class will handle the encoding and decoding from the API requests.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Unavailabilities implements ParsersInterface {
|
class Unavailabilities implements ParsersInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,6 +20,8 @@ namespace EA\Engine\Api\V1\Processors;
|
||||||
* easier to apply some custom filtering in order to get the required results.
|
* easier to apply some custom filtering in order to get the required results.
|
||||||
*
|
*
|
||||||
* @todo Implement this processor class.
|
* @todo Implement this processor class.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Filter implements ProcessorsInterface {
|
class Filter implements ProcessorsInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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
|
* Make sure that the response parameter is a sequential array and not a single entry by the time this
|
||||||
* processor is executed.
|
* processor is executed.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Minimize implements ProcessorsInterface {
|
class Minimize implements ProcessorsInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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
|
* Make sure that the response parameter is a sequential array and not a single entry by the time this
|
||||||
* processor is executed.
|
* processor is executed.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Paginate implements ProcessorsInterface {
|
class Paginate implements ProcessorsInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
|
|
||||||
namespace EA\Engine\Api\V1\Processors;
|
namespace EA\Engine\Api\V1\Processors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface ProcessorsInterface
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Api\V1\Processors
|
||||||
|
*/
|
||||||
interface ProcessorsInterface {
|
interface ProcessorsInterface {
|
||||||
public static function process(array &$response);
|
public static function process(array &$response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
* 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
|
* 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.
|
* a single entry by the time this processor is executed.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Search implements ProcessorsInterface {
|
class Search implements ProcessorsInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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
|
* 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
|
* response parameter is a sequential array and not a single entry by the time this processor is
|
||||||
* executed.
|
* executed.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Sort implements ProcessorsInterface {
|
class Sort implements ProcessorsInterface {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,6 +18,8 @@ namespace EA\Engine\Api\V1;
|
||||||
*
|
*
|
||||||
* This class handles the common request handling before the data are manipulated and
|
* This class handles the common request handling before the data are manipulated and
|
||||||
* returned back with the Response class.
|
* returned back with the Response class.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Request {
|
class Request {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,6 +25,8 @@ use EA\Engine\Types\NonEmptyText;
|
||||||
* $parser = new \EA\Engine\Api\V1\Parsers\Appointments;
|
* $parser = new \EA\Engine\Api\V1\Parsers\Appointments;
|
||||||
* $response = new \EA\Engine\Api\V1\Response($data);
|
* $response = new \EA\Engine\Api\V1\Response($data);
|
||||||
* $response->format($parser)->search()->sort()->paginate()->minimize()->output();
|
* $response->format($parser)->search()->sort()->paginate()->minimize()->output();
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Response {
|
class Response {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,6 +24,8 @@ use \EA\Engine\Types\Email as EmailAddress;
|
||||||
* This library handles all the notification email deliveries on the system.
|
* This library handles all the notification email deliveries on the system.
|
||||||
*
|
*
|
||||||
* Important: The email configuration settings are located at: /application/config/email.php
|
* Important: The email configuration settings are located at: /application/config/email.php
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class Email {
|
class Email {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,7 +13,18 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Boolean
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class Boolean extends Type {
|
class Boolean extends Type {
|
||||||
|
/**
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
return is_bool($value);
|
return is_bool($value);
|
||||||
|
|
|
@ -13,7 +13,19 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Decimal
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class Decimal extends Type {
|
class Decimal extends Type {
|
||||||
|
/**
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
return is_float($value);
|
return is_float($value);
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Email
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class Email extends NonEmptyText {
|
class Email extends NonEmptyText {
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,18 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Integer
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class Integer extends Type {
|
class Integer extends Type {
|
||||||
|
/**
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
return is_numeric($value) && ! is_float($value);
|
return is_numeric($value) && ! is_float($value);
|
||||||
|
|
|
@ -13,7 +13,18 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class NonEmptyText
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class NonEmptyText extends Text {
|
class NonEmptyText extends Text {
|
||||||
|
/**
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
return parent::_validate($value) && $value !== '';
|
return parent::_validate($value) && $value !== '';
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Text
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class Text extends Type {
|
class Text extends Type {
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,8 @@ namespace EA\Engine\Types;
|
||||||
/**
|
/**
|
||||||
* Abstract Type Class
|
* Abstract Type Class
|
||||||
*
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
* This class needs to be extended by the type classes which must implement the validation logic.
|
* This class needs to be extended by the type classes which must implement the validation logic.
|
||||||
*/
|
*/
|
||||||
abstract class Type {
|
abstract class Type {
|
||||||
|
|
|
@ -13,7 +13,18 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class UnsignedInteger
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class UnsignedInteger extends Integer {
|
class UnsignedInteger extends Integer {
|
||||||
|
/**
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
return parent::_validate($value) && $value > -1;
|
return parent::_validate($value) && $value > -1;
|
||||||
|
|
|
@ -13,7 +13,18 @@
|
||||||
|
|
||||||
namespace EA\Engine\Types;
|
namespace EA\Engine\Types;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Url
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @package EA\Engine\Types
|
||||||
|
*/
|
||||||
class Url extends NonEmptyText {
|
class Url extends NonEmptyText {
|
||||||
|
/**
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
protected function _validate($value)
|
protected function _validate($value)
|
||||||
{
|
{
|
||||||
return parent::_validate($value) && filter_var($value, FILTER_VALIDATE_URL);
|
return parent::_validate($value) && filter_var($value, FILTER_VALIDATE_URL);
|
||||||
|
|
Loading…
Reference in a new issue