mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 10:02:12 +00:00
Development
- Fixed: namespace being prepended on `RouterController` routes with absolute namespaces. - Fixed: match domain on `RouteController` and `RouteResource`. - Fixed: strict url-matching on `RouteController`. Fix should provide better url-matching. - Fixed: `RouterResource` always matching first url when having simular urls (ex: `/funny-cat` and `/funny-dog`). - Added `loadRoutes` method to `Router` class so routes now can be loaded without routing the request (useful when running in Cli etc). - Removed `getInstance` from `Router` class. Please use `SimpleRouter::router()` for singleton usage instead. - Added `getRemoteAddr` alias-method for `getIp` in `Request` class. - Added `getValue` to `IInputItem` interface. - Other minor optimizations. - Updated documentation with note on absolute/relative namespaces.
This commit is contained in:
@@ -12,6 +12,8 @@ interface IInputItem
|
||||
|
||||
public function setName($name);
|
||||
|
||||
public function getValue();
|
||||
|
||||
public function __toString();
|
||||
|
||||
}
|
||||
@@ -43,8 +43,8 @@ class InputFile implements IInputItem
|
||||
], $values);
|
||||
|
||||
return (new static($values['index']))
|
||||
->setError($values['error'])
|
||||
->setSize($values['size'])
|
||||
->setError($values['error'])
|
||||
->setType($values['type'])
|
||||
->setTmpName($values['tmp_name'])
|
||||
->setFilename($values['name']);
|
||||
@@ -199,7 +199,7 @@ class InputFile implements IInputItem
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if an upload error occured.
|
||||
* Return true if an upload error occurred.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -256,6 +256,11 @@ class InputFile implements IInputItem
|
||||
return $this->getTmpName();
|
||||
}
|
||||
|
||||
public function getValue()
|
||||
{
|
||||
return $this->getFilename();
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user