Navigation Menu

Skip to content

Commit

Permalink
Partially revert changes to Event.
Browse files Browse the repository at this point in the history
The changes around the data property will have to wait until Components
are also migrated to the new event style.
  • Loading branch information
markstory committed Jul 3, 2013
1 parent dd085fb commit 659cd12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Event/Event.php
Expand Up @@ -45,7 +45,7 @@ class Event {
*
* @var mixed $data
*/
protected $_data = null;
public $data = null;

/**
* Property used to retain the result value of the event listeners
Expand Down Expand Up @@ -77,7 +77,7 @@ class Event {
*/
public function __construct($name, $subject = null, $data = null) {
$this->_name = $name;
$this->_data = $data;
$this->data = $data;
$this->_subject = $subject;
}

Expand All @@ -88,7 +88,7 @@ public function __construct($name, $subject = null, $data = null) {
* @return mixed
*/
public function __get($attribute) {
if ($attribute === 'data' || $attribute === 'name' || $attribute === 'subject') {
if ($attribute === 'name' || $attribute === 'subject') {
return $this->{$attribute}();
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ public function isStopped() {
* @return array
*/
public function data() {
return (array)$this->_data;
return (array)$this->data;
}

}

0 comments on commit 659cd12

Please sign in to comment.