Moved regex/match functionality to LoadableRoute.

This commit is contained in:
Simon Sessingø
2016-11-28 04:45:46 +01:00
parent b694a7c0c9
commit 5c89ae2aaf
4 changed files with 41 additions and 40 deletions
-24
View File
@@ -40,7 +40,6 @@ abstract class Route implements IRoute
/* Default options */
protected $namespace;
protected $regex;
protected $requestMethods = [];
protected $where = [];
protected $parameters = [];
@@ -313,29 +312,6 @@ abstract class Route implements IRoute
return ($this->namespace === null) ? $this->defaultNamespace : $this->namespace;
}
/**
* Add regular expression match for the entire route.
*
* @param string $regex
* @return static
*/
public function setMatch($regex)
{
$this->regex = $regex;
return $this;
}
/**
* Get regular expression match used for matching route (if defined).
*
* @return string
*/
public function getMatch()
{
return $this->regex;
}
/**
* Export route settings to array so they can be merged with another route.
*