[FEATURE] Added option to change route and get information about current

route through the Request object.

- Updated documentation to relfect new changes.
This commit is contained in:
Simon Sessingø
2016-01-15 11:06:13 +01:00
parent 765204f552
commit aeacda1812
3 changed files with 42 additions and 0 deletions
+10
View File
@@ -77,6 +77,16 @@ abstract class RouterEntry {
return null;
}
public function setMethod($method) {
$this->callback = sprintf('%s@%s', $this->getClass(), $method);
return $this;
}
public function setClass($class) {
$this->callback = sprintf('%s@%s', $class, $this->getMethod());
return $this;
}
/**
* @param string $prefix
* @return self