added paging chunks to maplist

This commit is contained in:
Steffen Schröder
2014-04-28 16:59:55 +02:00
parent cac3550856
commit 8b83825344
5 changed files with 109 additions and 68 deletions

View File

@ -562,8 +562,23 @@ class MapManager implements CallbackListener {
*
* @return array
*/
public function getMaps() {
return array_values($this->maps);
public function getMaps($offset = null, $length = null) {
if ($offset === null) {
return array_values($this->maps);
}
if ($length === null) {
return array_slice($this->maps, $offset);
}
return array_slice($this->maps, $offset, $length);
}
/**
* Get the Number of Maps
*
* @return int
*/
public function getMapsCount() {
return count($this->maps);
}
/**