public function removeAll() { if ($this->readOnly) { throw new InvalidCallException('The cookie collection is read only.'); } $this->_cookies = []; }