_data = $data; $this->_count = count($this->_data); } /** * * returns an array of items for the selected page * * @param integer $offset page offset * @param integer $itemCountPerPage number of items per page * @return array */ public function getItems($offset, $itemCountPerPage) { return array_slice($this->_data, $offset, $itemCountPerPage); } /** * * return the number of array rows * * @return integer */ public function count() { return $this->_count; } }