Commit 41a96f30 by pupi1985

Remove setters from the Route class

parent 7fc25bec
...@@ -41,7 +41,7 @@ class Route ...@@ -41,7 +41,7 @@ class Route
public function __construct($id = null, $httpMethod = null, $routePath = null, $controller = null, $action = null) public function __construct($id = null, $httpMethod = null, $routePath = null, $controller = null, $action = null)
{ {
$this->id = $id; $this->id = $id;
$this->setHttpMethod($httpMethod); $this->httpMethod = strtoupper($httpMethod);
$this->routePath = $routePath; $this->routePath = $routePath;
$this->controller = $controller; $this->controller = $controller;
$this->action = $action; $this->action = $action;
...@@ -68,14 +68,6 @@ class Route ...@@ -68,14 +68,6 @@ class Route
} }
/** /**
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string * @return string
*/ */
public function getHttpMethod() public function getHttpMethod()
...@@ -84,14 +76,6 @@ class Route ...@@ -84,14 +76,6 @@ class Route
} }
/** /**
* @param string $httpMethod
*/
public function setHttpMethod($httpMethod)
{
$this->httpMethod = strtoupper($httpMethod);
}
/**
* @return string * @return string
*/ */
public function getRoutePath() public function getRoutePath()
...@@ -100,14 +84,6 @@ class Route ...@@ -100,14 +84,6 @@ class Route
} }
/** /**
* @param string $routePath
*/
public function setRoutePath($routePath)
{
$this->routePath = $routePath;
}
/**
* @return string * @return string
*/ */
public function getController() public function getController()
...@@ -116,14 +92,6 @@ class Route ...@@ -116,14 +92,6 @@ class Route
} }
/** /**
* @param string $controller
*/
public function setController($controller)
{
$this->controller = $controller;
}
/**
* @return string * @return string
*/ */
public function getAction() public function getAction()
...@@ -132,14 +100,6 @@ class Route ...@@ -132,14 +100,6 @@ class Route
} }
/** /**
* @param string $action
*/
public function setAction($action)
{
$this->action = $action;
}
/**
* @return array * @return array
*/ */
public function getParameters() public function getParameters()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment