Example #1
0
 /**
  * Attach a listener aggregate
  *
  * Listener aggregates accept an EventCollection instance, and call attach()
  * one or more times, typically to attach to multiple events using local
  * methods.
  *
  * @param  ListenerAggregate $aggregate
  * @param  int $priority If provided, a suggested priority for the aggregate to use
  * @return mixed return value of {@link ListenerAggregate::attach()}
  */
 public function attachAggregate(ListenerAggregate $aggregate, $priority = 1)
 {
     return $aggregate->attach($this, $priority);
 }
Example #2
0
 /**
  * Attach a listener aggregate
  *
  * Listener aggregates accept an EventCollection instance, and call attach()
  * one or more times, typically to attach to multiple events using local
  * methods.
  *
  * @param  ListenerAggregate $aggregate
  * @return mixed return value of {@link ListenerAggregate::attach()}
  */
 public function attachAggregate(ListenerAggregate $aggregate)
 {
     return $aggregate->attach($this);
 }