static function __set_state($state) { $o = new self(); foreach ($state as $k => $v) { $o->{$k} = $v; } return $o; }