Skip to content

Commit

Permalink
[interface] - Corrected fire interface
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Oct 17, 2019
1 parent e096246 commit c4cf1db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions phalcon/Events/Event.zep
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class Event implements EventInterface
"The source of " . type . " event must be an object, got " . (typeof source)
);
}
let this->type = type,
this->source = source,
this->data = data,
let this->type = type,
this->source = source,
this->data = data,
this->cancelable = cancelable;
}

Expand Down
2 changes: 1 addition & 1 deletion phalcon/Events/Manager.zep
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Manager implements ManagerInterface
* @param mixed data
* @return mixed
*/
public function fire(string! eventType, source, data = null, bool cancelable = true)
public function fire(string! eventType, object source, var data = null, bool cancelable = true)
{
var events, eventParts, type, eventName, event, status, fireEvents;

Expand Down
2 changes: 1 addition & 1 deletion phalcon/Events/ManagerInterface.zep
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface ManagerInterface
* @param mixed data
* @return mixed
*/
public function fire(string! eventType, source, data = null);
public function fire(string! eventType, object source, var data = null, bool cancelable = true);

/**
* Returns all the attached listeners of a certain type
Expand Down

0 comments on commit c4cf1db

Please sign in to comment.