mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[FEATURE] Features and optimisations
- Added where method to RouterRoute to support custom regular expression matches on routes. - Moved parameters property to RouterRoute class. - Added IRouteEntry class.
This commit is contained in:
@@ -18,11 +18,9 @@ abstract class RouterEntry {
|
||||
|
||||
protected $settings;
|
||||
protected $callback;
|
||||
protected $parameters;
|
||||
|
||||
public function __construct() {
|
||||
$this->settings = array();
|
||||
$this->parameters = array();
|
||||
}
|
||||
|
||||
protected function loadClass($name) {
|
||||
@@ -63,22 +61,6 @@ abstract class RouterEntry {
|
||||
return $this->callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getParameters(){
|
||||
return $this->parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $parameters
|
||||
* @return self
|
||||
*/
|
||||
public function setParameters($parameters) {
|
||||
$this->parameters = $parameters;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prefix
|
||||
* @return self
|
||||
|
||||
Reference in New Issue
Block a user