mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 10:42:14 +00:00
Development
- Added event-arguments data. - Added event-arguments to the event list in documentation. - Fixed missing exceptions thrown in phpDocs. - Added unit-tests for new event functionality.
This commit is contained in:
@@ -70,6 +70,34 @@ class EventArgument implements IEventArgument
|
||||
return $this->getRouter()->getRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
return $this->arguments[$name] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function __isset($name)
|
||||
{
|
||||
return array_key_exists($name, $this->arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function __set($name, $value)
|
||||
{
|
||||
throw new \InvalidArgumentException('Not supported');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arguments
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user