Skip to content
Permalink
Browse files

Partially revert changes to Event.

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 659cd125fac1b641e8d86e18ff1d76c42a08bdc0
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Cake/Event/Event.php
@@ -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
@@ -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;
}
@@ -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}();
}
}
@@ -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.
You can’t perform that action at this time.