public function unserialize($data) { $data = unserialize($data); static::_init(); foreach ($data as $key => $value) { $this->{$key} = $value; } }