/** * Creates the new Request object by getting a new URI object, then parsing * the uri with the Route class. Once constructed we need to save the method * and GET/POST/PUT or DELETE dataset * * @param string $uri - The URI of the request * @param bool $route -if true use routes to process the URI * @param string $type - GET|POST|PUT|DELETE * @param array $dataset */ public function __construct($uri, $route, $dataset = array(), $type = null) { parent::__construct($uri, $route); // store this construct method and data staticly if (null !== $type) { $this->request_method = $type; $this->request_data = $dataset; } $this->response = null; }
/** * Creates the new Request object by getting a new URI object, then parsing * the uri with the Route class. Once constructed we need to save the method * and GET/POST/PUT or DELETE dataset * * @param string $uri - The URI of the request * @param bool $route -if true use routes to process the URI * @param string $type - GET|POST|PUT|DELETE * @param array $dataset */ public function __construct($uri, $route, $dataset = array(), $type = 'GET') { parent::__construct($uri, $route); // store this construct method and data staticly $this->_request_method = $type; $this->_request_data = $dataset; $this->response = NULL; }