public function clear($key = null)
    {
        if (isset($key)) {
            if (isset($this->data[$key])) {
                unset($this->data[$key]);
            }
        } else {
            $this->data = [];
        }
    }