added paging chunks to maplist

This commit is contained in:
Steffen Schröder committed 2014-05-01 17:35:47 +02:00
1 parent cac3550856
commit 8b83825344
5 files changed
+109 -68

No files matched your search

+17 -2
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);
}
/**