PATH:
var
/
www
/
vhosts
/
sandbox.dos-group.com
/
beacons.sandbox.dos-group.com
/
vendor
/
dos
/
common
/
src
/
Dos
/
Api
<?php /** * @Author Mariano.Pirelli * @Copyright (c) 2015 DOS Group. All rights reserved */ namespace Dos\Api; use Dos\Api\Content\Body; use Dos\Api\Content\Error; /** * Class DataResponse * @package Dos\Data */ abstract class DataResponse implements DataResponseInterface { /** * @var Body */ protected $body; /** * JsonResponse constructor. */ public function __construct() { $this->body = new Body(); } /** * @param string $key * @param mixed $data * @return $this */ public function setDataForKey($key, $data) { $this->body->setDataForKey($key, $data); return $this; } /** * @param string $key * @param mixed $data * @return $this */ public function appendDataForKey($key, $data) { $this->body->appendDataForKey($key, $data); return $this; } /** * @param $key * @return $this */ public function removeDataForKey($key) { $this->body->removeDataForKey($key); return $this; } /** * @param mixed $data * @return $this */ public function setData($data) { $this->body->setData($data); return $this; } /** * @param mixed $data * @return $this */ public function setPagination($data) { $this->body->setPagination($data); return $this; } /** * @return mixed */ public function getData() { return $this->body->getData(); } /** * @param string $errorCode * @param string $errorMessage * @param null $userMessage * @return $this */ public function setError($errorCode, $errorMessage, $userMessage=null) { $this->body->setError(new Error($errorCode, $errorMessage, $userMessage)); return $this; } /** * @return Error */ public function getError() { return $this->body->getError(); } /** * @return bool */ public function hasError() { return $this->body->hasError(); } }
[+]
Content
[+]
..
[-] DataResponseInterface.php
[open]
[+]
Response
[-] DataResponse.php
[open]