Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add setController and setAction
  • Loading branch information
iannsp committed Apr 10, 2012
1 parent fc2c016 commit 0e1fca7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Request.php
Expand Up @@ -86,6 +86,17 @@ private function setDefaultControllerAction(Array $GET)
return false;
}
}
public function setController($controller)
{
$this->PAIRGET['controller'] = ucfirst($controller)."Controller";
$this->GET[0] = $this->PAIRGET['controller'];
}
public function setAction($action)
{
$this->PAIRGET['action'] = ucfirst($action);
$this->GET[1] = $this->PAIRGET['action'];

}
/**
* inform if the Request is a GET Request
* @return boolean
Expand Down Expand Up @@ -142,8 +153,10 @@ public function getParams()
* @return string
* @access public
*/
public function getQuery($name)
public function getQuery($name=null)
{
if (is_null($name))
return $this->PAIRGET;
if( array_key_exists($name, $this->PAIRGET) &&
!is_null($this->PAIRGET[$name])
) {
Expand Down

0 comments on commit 0e1fca7

Please sign in to comment.