public function key()
{
if (!is_array($this->result)) {
return $this->pos === 0 ? 0 : null;
} elseif ($this->resultType === static::RESULT_TYPE_DEFAULT) {
return $this->pos;
} elseif ($this->resultType === static::RESULT_TYPE_MESSAGE) {
// channel
return $this->result[1];
} elseif ($this->resultType === static::RESULT_TYPE_ARGSVALS) {
return $this->args[$this->pos];
} elseif ($this->resultType === static::RESULT_TYPE_ASSOC) {
return $this->result[$this->pos * 2];
}
}