示例#1
0
 public function __construct($getvar, URLBuilder $URLBuilder)
 {
     parent::__construct($URLBuilder);
     $this->getvar = $getvar;
     $this->url = filter_input(INPUT_GET, $getvar);
     $this->action = '';
     $this->url_parts = [];
     if (!empty($this->url)) {
         if ($this->url[strlen($this->url) - 1] == '/') {
             $this->url = substr($this->url, 0, -1);
         }
         $url_parts = explode('/', $this->url);
         $this->action = $url_parts[0];
         $this->url_parts = $url_parts;
     }
 }
示例#2
0
 public function __construct($getvar, URLBuilder $URLBuilder)
 {
     parent::__construct($URLBuilder);
     $this->getvar = $getvar;
     $this->getvalue = filter_input(INPUT_GET, $getvar);
 }