public function serialize()
{
$save = array();
if ($this->duplicates) {
$save['d'] = 1;
}
if ($this->_sequence) {
$save['s'] = 1;
}
if ($this->_sorted) {
$save['is'] = 1;
}
switch ($this->_ids) {
case self::ALL:
$save['a'] = true;
break;
case self::LARGEST:
$save['l'] = true;
break;
case self::SEARCH_RES:
$save['sr'] = true;
break;
default:
$save['i'] = strval($this);
break;
}
return serialize($save);
}