1<?php
2
3namespace Basho\Riak\Command\TimeSeries;
4
5use Basho\Riak\Command;
6
7/**
8 * Response object for TS Fetch, Store, Delete
9 *
10 * @author Christopher Mancini <cmancini at basho d0t com>
11 */
12class Response extends Command\Response
13{
14    protected $rows = [];
15
16    public function __construct($success = true, $code = 0, $message = '', $rows = [])
17    {
18        parent::__construct($success, $code, $message);
19
20        $this->rows = $rows;
21    }
22
23    /**
24     * @return \Basho\Riak\TimeSeries\Cell[]|null
25     */
26    public function getRow()
27    {
28        return !empty($this->rows[0]) ? $this->rows[0] : null;
29    }
30
31    /**
32     * @return array
33     */
34    public function getRows()
35    {
36        return $this->rows;
37    }
38}
39