Exemplo n.º 1
0
 /**
  * @param null|string $url
  * @param string $method
  * @param array $data
  */
 public function __construct($url = null, $method = null, array $data = array())
 {
     parent::__construct($url);
     if (!empty($method)) {
         $this->setMethod($method);
     }
     if (!empty($data)) {
         $this->setData($data);
     }
 }
Exemplo n.º 2
0
 /**
  * Constructor : defines the current URL and gets the routes
  */
 public function __construct()
 {
     parent::guessFromCurrent();
     $server_uri = $_SERVER['REQUEST_URI'];
     $server_query = $_SERVER['QUERY_STRING'];
     $full_query_string = str_replace(array('?', $server_query), '', trim($server_uri, '/'));
     parse_str($full_query_string, $full_query);
     if (!empty($full_query)) {
         $this->setArguments(array_merge($this->getArguments(), $full_query));
     }
 }