Skip to content

Commit

Permalink
Use magic __serialize/__unserialize to phase out Serializable (#1)
Browse files Browse the repository at this point in the history
* Use magic __serialize/__unserialize to phase out Serializable

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>

* fixup! Use magic __serialize/__unserialize to phase out Serializable

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>

Co-authored-by: Kieran <kieran.brahney@gmail.com>
  • Loading branch information
ChristophWurst and bytestream committed Apr 28, 2022
1 parent b7a672a commit b55efcf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Horde/Mail/Rfc822/List.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,4 +526,14 @@ public function unserialize($data)
$this->_data = unserialize($data);
}

public function __serialize() {
return array(
'data' => $this->_data
);
}

public function __unserialize(array $data) {
$this->_data = $data['data'];
}

}

0 comments on commit b55efcf

Please sign in to comment.