Skip to content

Commit

Permalink
Renamed Event::add() -> append(); Event::unshift() -> prepend()
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Oct 16, 2013
1 parent 9a08df4 commit 4d06bc4
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/Kdyby/Events/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function dispatch($args = array())
* @param callable $listener
* @return Event
*/
public function add($listener)
public function append($listener)
{
$this->listeners[] = callback($listener);
return $this;
Expand All @@ -142,7 +142,7 @@ public function add($listener)
* @param callable $listener
* @return Event
*/
public function unshift($listener)
public function prepend($listener)
{
array_unshift($this->listeners, callback($listener));
return $this;
Expand Down Expand Up @@ -215,6 +215,22 @@ public static function parseName($name)



/** @deprecated */
public function add($listener)
{
return $this->append($listener);
}



/** @deprecated */
public function unshift($listener)
{
return $this->prepend($listener);
}



/********************* interface \Countable *********************/


Expand Down

0 comments on commit 4d06bc4

Please sign in to comment.