name: GenericEvent
class_comment: '# * Event encapsulation class.

  # *

  # * Encapsulates events thus decoupling the observer from the subject they encapsulate.

  # *

  # * @author Drak <drak@zikula.org>

  # *

  # * @implements \ArrayAccess<string, mixed>

  # * @implements \IteratorAggregate<string, mixed>'
dependencies:
- name: Event
  type: class
  source: Symfony\Contracts\EventDispatcher\Event
properties: []
methods:
- name: __construct
  visibility: public
  parameters:
  - name: subject
    default: 'null'
  - name: arguments
    default: '[]'
  comment: '# * Event encapsulation class.

    # *

    # * Encapsulates events thus decoupling the observer from the subject they encapsulate.

    # *

    # * @author Drak <drak@zikula.org>

    # *

    # * @implements \ArrayAccess<string, mixed>

    # * @implements \IteratorAggregate<string, mixed>

    # */

    # class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate

    # {

    # /**

    # * Encapsulate an event with $subject and $arguments.

    # *

    # * @param mixed $subject   The subject of the event, usually an object or a callable

    # * @param array $arguments Arguments to store in the event'
- name: getSubject
  visibility: public
  parameters: []
  comment: '# * Getter for subject property.'
- name: getArgument
  visibility: public
  parameters:
  - name: key
  comment: '# * Get argument by key.

    # *

    # * @throws \InvalidArgumentException if key is not found'
- name: setArgument
  visibility: public
  parameters:
  - name: key
  - name: value
  comment: '# * Add argument to event.

    # *

    # * @return $this'
- name: getArguments
  visibility: public
  parameters: []
  comment: '# * Getter for all arguments.'
- name: setArguments
  visibility: public
  parameters:
  - name: args
    default: '[]'
  comment: '# * Set args property.

    # *

    # * @return $this'
- name: hasArgument
  visibility: public
  parameters:
  - name: key
  comment: '# * Has argument.'
- name: offsetGet
  visibility: public
  parameters:
  - name: key
  comment: '# * ArrayAccess for argument getter.

    # *

    # * @param string $key Array key

    # *

    # * @throws \InvalidArgumentException if key does not exist in $this->args'
- name: offsetSet
  visibility: public
  parameters:
  - name: key
  - name: value
  comment: '# * ArrayAccess for argument setter.

    # *

    # * @param string $key Array key to set'
- name: offsetUnset
  visibility: public
  parameters:
  - name: key
  comment: '# * ArrayAccess for unset argument.

    # *

    # * @param string $key Array key'
- name: offsetExists
  visibility: public
  parameters:
  - name: key
  comment: '# * ArrayAccess has argument.

    # *

    # * @param string $key Array key'
- name: getIterator
  visibility: public
  parameters: []
  comment: '# * IteratorAggregate for iterating over the object like an array.

    # *

    # * @return \ArrayIterator<string, mixed>'
traits:
- Symfony\Contracts\EventDispatcher\Event
interfaces:
- \ArrayAccess
- \IteratorAggregate
- \ArrayAccess