Updated the User-module.
[AOOS.git] / modules / Paginator / Paginator.php
blob9827e8781007b803555e68639f45a5505c091b1d
1 <?php
3 class Paginator extends AOOSModule
5 private $_module = null;
6 private $_options = null;
8 public function show()
10 $url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
11 $url = str_replace($this->core()->getSetting("server_name"), "", $url);
12 $parts = explode("/", $url);
13 if (strlen($parts[0]) > 0)
15 $this->_module = array_shift($parts);
16 $this->_options = array();
17 foreach ($parts as $f)
19 $this->_options[] = array_shift($parts);
21 if (!$this->core()->isLoaded($this->_module))
23 return false;
25 return $this->core()->getModule($this->_module)->show();
27 $module = $this->core()->getSetting("default_module", __class__);
28 return $this->core()->getModule($module)->show();
31 public function options()
33 return $this->_options;