mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Moved regex/match functionality to LoadableRoute.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user