public function join($token = ',', $secondToken = null)
{
$ret = '';
if ($secondToken) {
foreach ($this as $el) {
$ret .= $token . $el . $secondToken;
}
} else {
$this->rewind();
while ($this->valid()) {
$ret .= (string) $this->current();
$this->next();
if ($this->valid()) {
$ret .= $token;
}
}
}
return $ret;
}