SqlParser\TokensList::offsetSet PHP Method

offsetSet() public method

Sets an value inside the container.
public offsetSet ( integer $offset, Token $value ) : void
$offset integer The offset to be set.
$value Token The token to be saved.
return void
    public function offsetSet($offset, $value)
    {
        if ($offset === null) {
            $this->tokens[$this->count++] = $value;
        } else {
            $this->tokens[$offset] = $value;
        }
    }