diff options
Diffstat (limited to 'vendor/symfony/event-dispatcher/GenericEvent.php')
-rw-r--r-- | vendor/symfony/event-dispatcher/GenericEvent.php | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php index 03cbcfe3..95c99408 100644 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ b/vendor/symfony/event-dispatcher/GenericEvent.php @@ -20,25 +20,14 @@ namespace Symfony\Component\EventDispatcher; */ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate { - /** - * Event subject. - * - * @var mixed usually object or callable - */ protected $subject; - - /** - * Array of arguments. - * - * @var array - */ protected $arguments; /** * Encapsulate an event with $subject and $args. * - * @param mixed $subject The subject of the event, usually an object. - * @param array $arguments Arguments to store in the event. + * @param mixed $subject The subject of the event, usually an object or a callable + * @param array $arguments Arguments to store in the event */ public function __construct($subject = null, array $arguments = array()) { @@ -49,7 +38,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Getter for subject property. * - * @return mixed $subject The observer subject. + * @return mixed $subject The observer subject */ public function getSubject() { @@ -59,11 +48,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Get argument by key. * - * @param string $key Key. + * @param string $key Key * - * @return mixed Contents of array key. + * @return mixed Contents of array key * - * @throws \InvalidArgumentException If key is not found. + * @throws \InvalidArgumentException if key is not found */ public function getArgument($key) { @@ -77,10 +66,10 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Add argument to event. * - * @param string $key Argument name. - * @param mixed $value Value. + * @param string $key Argument name + * @param mixed $value Value * - * @return GenericEvent + * @return $this */ public function setArgument($key, $value) { @@ -102,9 +91,9 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Set args property. * - * @param array $args Arguments. + * @param array $args Arguments * - * @return GenericEvent + * @return $this */ public function setArguments(array $args = array()) { @@ -116,7 +105,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Has argument. * - * @param string $key Key of arguments array. + * @param string $key Key of arguments array * * @return bool */ @@ -128,11 +117,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess for argument getter. * - * @param string $key Array key. + * @param string $key Array key * * @return mixed * - * @throws \InvalidArgumentException If key does not exist in $this->args. + * @throws \InvalidArgumentException if key does not exist in $this->args */ public function offsetGet($key) { @@ -142,8 +131,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess for argument setter. * - * @param string $key Array key to set. - * @param mixed $value Value. + * @param string $key Array key to set + * @param mixed $value Value */ public function offsetSet($key, $value) { @@ -153,7 +142,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess for unset argument. * - * @param string $key Array key. + * @param string $key Array key */ public function offsetUnset($key) { @@ -165,7 +154,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess has argument. * - * @param string $key Array key. + * @param string $key Array key * * @return bool */ |