for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MediaMonks\RestApi\Response;
class CursorPaginatedResponse extends AbstractPaginatedResponse implements PaginatedResponseInterface
{
/**
* @var mixed
*/
protected $before;
protected $after;
* @param $data
* @param $before
* @param $after
* @param $limit
* @param null $total
$total
null
public function __construct($data, $before, $after, $limit, $total = null)
parent::__construct($data, $limit, $total);
$this->before = $before;
$this->after = $after;
}
* @return mixed
public function getBefore()
return $this->before;
* @param mixed $before
public function setBefore($before)
public function getAfter()
return $this->after;
* @param mixed $after
public function setAfter($after)
* @return array
public function toArray()
$data = [
'before' => $this->getBefore(),
'after' => $this->getAfter(),
'limit' => $this->getLimit(),
];
if (!is_null($this->getTotal())) {
$data['total'] = $this->getTotal();
return $data;