diff --git a/src/Event/SerializableEventTrait.php b/src/Event/SerializableEventTrait.php index cefb75d..7dde2e5 100644 --- a/src/Event/SerializableEventTrait.php +++ b/src/Event/SerializableEventTrait.php @@ -14,7 +14,15 @@ trait SerializableEventTrait */ public function serialize() { - return serialize(get_object_vars($this)); + return serialize($this->__serialize()); + } + + /** + * @return array + */ + public function __serialize() + { + return get_object_vars($this); } /**