2016-07-09 10:02:25 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
|
|
|
*
|
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
|
|
|
* @copyright Copyright (c) 2013 - 2016, Alex Tselegidis
|
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.2.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
2016-07-09 22:53:28 +03:00
|
|
|
namespace EA\Engine\Api\V1\Parsers;
|
2016-07-09 10:02:25 +03:00
|
|
|
|
2016-07-10 11:59:39 +03:00
|
|
|
/**
|
|
|
|
* Parsers Interface
|
|
|
|
*
|
|
|
|
* Every parser needs the "encode" and "decode" methods.
|
|
|
|
*/
|
2016-07-09 22:53:28 +03:00
|
|
|
interface ParsersInterface {
|
2016-07-10 11:59:39 +03:00
|
|
|
/**
|
|
|
|
* Encode Response Array
|
|
|
|
*
|
|
|
|
* @param array &$response The response to be encoded.
|
|
|
|
*/
|
2016-07-09 22:53:28 +03:00
|
|
|
public function encode(array &$response);
|
2016-07-10 11:59:39 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Decode Request
|
|
|
|
*
|
|
|
|
* @param array &$request The request to be decoded.
|
|
|
|
* @param array $base Optional (null), if provided it will be used as a base array.
|
|
|
|
*/
|
|
|
|
public function decode(array &$request, array $base = null);
|
2016-07-09 14:14:08 +03:00
|
|
|
}
|