Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2 into feat…
Browse files Browse the repository at this point in the history
…ure/console
  • Loading branch information
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 150 deletions.
44 changes: 22 additions & 22 deletions src/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Representation of an event
*
* Encapsulates the target context and parameters passed, and provides some
* Encapsulates the target context and parameters passed, and provides some
* behavior for interacting with the event manager.
*
* @category Zend
Expand Down Expand Up @@ -47,10 +47,10 @@ class Event implements EventInterface
* Constructor
*
* Accept a target and its parameters.
*
*
* @param string $name Event name
* @param string|object $target
* @param array|ArrayAccess $params
* @param string|object $target
* @param array|ArrayAccess $params
* @return void
*/
public function __construct($name = null, $target = null, $params = null)
Expand All @@ -70,7 +70,7 @@ public function __construct($name = null, $target = null, $params = null)

/**
* Get event name
*
*
* @return string
*/
public function getName()
Expand All @@ -82,7 +82,7 @@ public function getName()
* Get the event target
*
* This may be either an object, or the name of a static method.
*
*
* @return string|object
*/
public function getTarget()
Expand All @@ -94,8 +94,8 @@ public function getTarget()
* Set parameters
*
* Overwrites parameters
*
* @param array|ArrayAccess|object $params
*
* @param array|ArrayAccess|object $params
* @return Event
* @throws Exception\InvalidArgumentException
*/
Expand All @@ -113,7 +113,7 @@ public function setParams($params)

/**
* Get all parameters
*
*
* @return array|object|ArrayAccess
*/
public function getParams()
Expand All @@ -125,9 +125,9 @@ public function getParams()
* Get an individual parameter
*
* If the parameter does not exist, the $default value will be returned.
*
* @param string|int $name
* @param mixed $default
*
* @param string|int $name
* @param mixed $default
* @return mixed
*/
public function getParam($name, $default = null)
Expand All @@ -150,8 +150,8 @@ public function getParam($name, $default = null)

/**
* Set the event name
*
* @param string $name
*
* @param string $name
* @return Event
*/
public function setName($name)
Expand All @@ -162,8 +162,8 @@ public function setName($name)

/**
* Set the event target/context
*
* @param null|string|object $target
*
* @param null|string|object $target
* @return Event
*/
public function setTarget($target)
Expand All @@ -174,9 +174,9 @@ public function setTarget($target)

/**
* Set an individual parameter to a value
*
* @param string|int $name
* @param mixed $value
*
* @param string|int $name
* @param mixed $value
* @return Event
*/
public function setParam($name, $value)
Expand All @@ -193,8 +193,8 @@ public function setParam($name, $value)

/**
* Stop further event propagation
*
* @param bool $flag
*
* @param bool $flag
* @return void
*/
public function stopPropagation($flag = true)
Expand All @@ -204,7 +204,7 @@ public function stopPropagation($flag = true)

/**
* Is propagation stopped?
*
*
* @return bool
*/
public function propagationIsStopped()
Expand Down
34 changes: 17 additions & 17 deletions src/EventInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,78 +22,78 @@ interface EventInterface
{
/**
* Get event name
*
*
* @return string
*/
public function getName();

/**
* Get target/context from which event was triggered
*
*
* @return null|string|object
*/
public function getTarget();

/**
* Get parameters passed to the event
*
*
* @return array|ArrayAccess
*/
public function getParams();

/**
* Get a single parameter by name
*
* @param string $name
*
* @param string $name
* @param mixed $default Default value to return if parameter does not exist
* @return mixed
*/
public function getParam($name, $default = null);

/**
* Set the event name
*
* @param string $name
*
* @param string $name
* @return void
*/
public function setName($name);

/**
* Set the event target/context
*
* @param null|string|object $target
*
* @param null|string|object $target
* @return void
*/
public function setTarget($target);

/**
* Set event parameters
*
* @param string $params
*
* @param string $params
* @return void
*/
public function setParams($params);

/**
* Set a single parameter by key
*
* @param string $name
* @param mixed $value
*
* @param string $name
* @param mixed $value
* @return void
*/
public function setParam($name, $value);

/**
* Indicate whether or not the parent EventManagerInterface should stop propagating events
*
* @param bool $flag
*
* @param bool $flag
* @return void
*/
public function stopPropagation($flag = true);

/**
* Has this event indicated event propagation should stop?
*
*
* @return bool
*/
public function propagationIsStopped();
Expand Down
10 changes: 5 additions & 5 deletions src/EventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function setSharedManager(SharedEventManagerInterface $sharedEventManager

/**
* Remove any shared event manager currently attached
*
*
* @return void
*/
public function unsetSharedManager()
Expand Down Expand Up @@ -246,7 +246,7 @@ public function triggerUntil($event, $target, $argv = null, $callback = null)
* executed. By default, this value is 1; however, you may set it for any
* integer value. Higher values have higher priority (i.e., execute first).
*
* You can specify "*" for the event name. In such cases, the listener will
* You can specify "*" for the event name. In such cases, the listener will
* be triggered for every event.
*
* @param string|array|ListenerAggregateInterface $event An event or array of event names. If a ListenerAggregateInterface, proxies to {@link attachAggregate()}.
Expand Down Expand Up @@ -509,9 +509,9 @@ protected function getSharedListeners($event)
* Add listeners to the master queue of listeners
*
* Used to inject shared listeners and wildcard listeners.
*
* @param PriorityQueue $masterListeners
* @param PriorityQueue $listeners
*
* @param PriorityQueue $masterListeners
* @param PriorityQueue $listeners
* @return void
*/
protected function insertListeners($masterListeners, $listeners)
Expand Down
2 changes: 1 addition & 1 deletion src/EventManagerAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface EventManagerAwareInterface extends EventsCapableInterface
{
/**
* Inject an EventManager instance
*
*
* @param EventManagerInterface $eventManager
* @return void
*/
Expand Down
38 changes: 19 additions & 19 deletions src/EventManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ interface EventManagerInterface extends SharedEventManagerAwareInterface
* - Passing event name, target, and array|ArrayAccess of arguments
*
* Can emulate triggerUntil() if the last argument provided is a callback.
*
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param null|callback $callback
*
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param null|callback $callback
* @return ResponseCollection
*/
public function trigger($event, $target = null, $argv = array(), $callback = null);
Expand All @@ -49,19 +49,19 @@ public function trigger($event, $target = null, $argv = array(), $callback = nul
* - Passing event name, Event object, and callback only
* - Passing event name, target, Event object, and callback
* - Passing event name, target, array|ArrayAccess of arguments, and callback
*
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param callback $callback
*
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param callback $callback
* @return ResponseCollection
*/
public function triggerUntil($event, $target, $argv = null, $callback = null);

/**
* Attach a listener to an event
*
* @param string $event
*
* @param string $event
* @param callback $callback
* @param int $priority Priority at which to register listener
* @return CallbackHandler
Expand All @@ -70,31 +70,31 @@ public function attach($event, $callback = null, $priority = 1);

/**
* Detach an event listener
*
* @param CallbackHandler|ListenerAggregateInterface $listener
*
* @param CallbackHandler|ListenerAggregateInterface $listener
* @return bool
*/
public function detach($listener);

/**
* Get a list of events for which this collection has listeners
*
*
* @return array
*/
public function getEvents();

/**
* Retrieve a list of listeners registered to a given event
*
* @param string $event
*
* @param string $event
* @return array|object
*/
public function getListeners($event);

/**
* Clear all listeners for a given event
*
* @param string $event
*
* @param string $event
* @return void
*/
public function clearListeners($event);
Expand Down
Loading

0 comments on commit 860ba0d

Please sign in to comment.