private function identifyMethod(IProviderProvider $provider)
 {
     $url = $provider->get("url")->getUrl();
     if (count($url) >= 2) {
         if (!is_numeric($url[1])) {
             $this->method = $url[1];
         }
     } else {
         $this->method = $this->http_method;
     }
 }
Esempio n. 2
0
 public function __construct(IProviderProvider $provider)
 {
     $method_provider = $provider->get("method");
     $this->http_method = $method_provider->getHTTPMethod();
     $this->method = $method_provider->getMethod();
     $this->url = $provider->get("url")->getUrl();
     $this->get_data = $provider->get("get")->getData();
     if ($this->method != "get") {
         $this->post_data = $provider->get("post")->getData();
     }
     if (count($this->url) == 0) {
         $this->resource_name = "_Default";
     } else {
         $this->resource_name = $this->url[0];
     }
 }
 public function __construct(IProviderProvider $provider, Parser $parser)
 {
     $this->data = $parser->parse($_GET);
     $this->addID($provider->get("url")->getUrl());
 }