/** * Prepare session for resuming */ public function __wakeup() { // Check if all properties exist... foreach (["id", "encoded", "hash", "timeStamp"] as $property) { if (!property_exists($this, $property)) { throw SessionException::badWakeUp(); } } }