added uri class. refactored.
This commit is contained in:
@@ -221,7 +221,10 @@ class Route {
|
||||
*/
|
||||
public function __call($method, $parameters)
|
||||
{
|
||||
if (strpos($method, 'is_') === 0) return $this->is(substr($method, 3));
|
||||
if (strpos($method, 'is_') === 0)
|
||||
{
|
||||
return $this->is(substr($method, 3));
|
||||
}
|
||||
|
||||
throw new \Exception("Call to undefined method [$method] on Route class.");
|
||||
}
|
||||
|
||||
@@ -217,22 +217,6 @@ class Router {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the request formats for which the route provides responses.
|
||||
*
|
||||
* @param mixed $callback
|
||||
* @return array
|
||||
*/
|
||||
protected function formats($callback)
|
||||
{
|
||||
if (is_array($callback) and isset($callback['provides']))
|
||||
{
|
||||
return (is_string($provides = $callback['provides'])) ? explode('|', $provides) : $provides;
|
||||
}
|
||||
|
||||
return array('html');
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate route URI wildcards into actual regular expressions.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user