|
@@ -15,7 +15,7 @@ namespace Symfony\Component\EventDispatcher;
|
|
|
*
|
|
|
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
|
|
*/
|
|
|
-class Event implements \ArrayAccess
|
|
|
+class Event
|
|
|
{
|
|
|
protected $value = null;
|
|
|
protected $processed = false;
|
|
@@ -147,53 +147,4 @@ class Event implements \ArrayAccess
|
|
|
{
|
|
|
$this->parameters[$name] = $value;
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * Returns true if the parameter exists (implements the ArrayAccess interface).
|
|
|
- *
|
|
|
- * @param string $name The parameter name
|
|
|
- *
|
|
|
- * @return Boolean true if the parameter exists, false otherwise
|
|
|
- */
|
|
|
- public function offsetExists($name)
|
|
|
- {
|
|
|
- return array_key_exists($name, $this->parameters);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Returns a parameter value (implements the ArrayAccess interface).
|
|
|
- *
|
|
|
- * @param string $name The parameter name
|
|
|
- *
|
|
|
- * @return mixed The parameter value
|
|
|
- */
|
|
|
- public function offsetGet($name)
|
|
|
- {
|
|
|
- if (!array_key_exists($name, $this->parameters)) {
|
|
|
- throw new \InvalidArgumentException(sprintf('The event "%s" has no "%s" parameter.', $this->name, $name));
|
|
|
- }
|
|
|
-
|
|
|
- return $this->parameters[$name];
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Sets a parameter (implements the ArrayAccess interface).
|
|
|
- *
|
|
|
- * @param string $name The parameter name
|
|
|
- * @param mixed $value The parameter value
|
|
|
- */
|
|
|
- public function offsetSet($name, $value)
|
|
|
- {
|
|
|
- $this->parameters[$name] = $value;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Removes a parameter (implements the ArrayAccess interface).
|
|
|
- *
|
|
|
- * @param string $name The parameter name
|
|
|
- */
|
|
|
- public function offsetUnset($name)
|
|
|
- {
|
|
|
- unset($this->parameters[$name]);
|
|
|
- }
|
|
|
}
|