1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
<?php
namespace hji\membership\models\data;
class Paging
{
protected $count;
protected $number;
protected $size;
public function __construct($number = null, $count = null, $size = null)
{
if (is_array($number) || is_object($number))
{
$this->setProperties($number);
}
else
{
$this->number = $number;
$this->count = $count;
$this->size = $size;
}
}
public function setProperties($data)
{
$data = (array)$data;
$this->number = isset($data['number']) ? $data['number'] : null;
$this->count = isset($data['count']) ? $data['count'] : null;
$this->size = isset($data['size']) ? $data['size'] : null;
}
public function getCount()
{
return $this->count;
}
public function getNumber()
{
return $this->number;
}
public function getSize()
{
return $this->size;
}
}