public function delete($key = null)
    {
        if ($key === null) {
            $this->reset();

            return $this;
        }

        $arr = &$this->getStackByReference($key);

        if (is_array($arr) && array_key_exists($key, $arr)) {
            unset($arr[$key]);
        }

        return $this;
    }