Destroy current shopping cart

@return self
198545
public function delete()
    {
        $cookies = $this->cookiesSupported();
        $cart = $this->getCurrent();

        // Only delete the cart if it has been written to the DB
        if ($cart->exists()) {
            $cart->delete();
        }

        if ($cookies) {
            Cookie::force_expiry(self::COOKIE_NAME);
        } else {
            $this->getSession()->clear(self::COOKIE_NAME);
        }

        return $this;
    }
477535
public function destroy()
    {
        return Basecamp::chatbots($this->bucket->id, $this->campfire->id)
                       ->destroy($this->id);
    }
1219083
public function disconnect()
    {
        $parents = $this->parents();
        foreach ($parents->keys() as $object) {
            $path = $parents->get($object);
            unset($object->{$path});
        }
        return $this;
    }
321809
public function destroy()
	{
		// delete the session cookie
		\Cookie::delete($this->config['cookie_name'], $this->config['cookie_path'], $this->config['cookie_domain'], null, $this->config['cookie_http_only']);

		// reset the stored session data
		$this->keys = $this->flash = $this->data = array();

		return $this;
	}
211929
public function rollback(): self
    {
        ($this->fulfill)(
            new Request(
                $this->current()->endpoint(),
                Method::delete(),
                new ProtocolVersion(1, 1)
            )
        );
        $this->transactions = $this->transactions->dropEnd(1);

        return $this;
    }
7751
public function unregister()
    {
        $this->files->unregister();
        $this->psr0->unregister();
        $this->psr4->unregister();

        return $this;
    }
375981
public function remove()
    {
        $args = func_get_args();
        
        if (count($args) == 0) {
            return $this;
        }
        
        $last = array_pop($args);
        
        $pointer = &$this->data;
        foreach ($args as $i => $step) {
            if (!isset($pointer[$step])
                || !is_array($pointer[$step])
            ) {
                return $this;
            }

            $pointer = &$pointer[$step];
        }
        
        unset($pointer[$last]);
        
        return $this;
    }
642819
protected function _destroyReader()
    {
        if ($this->_reader instanceof Mage_Archive_Helper_File) {
            $this->_reader->close();
            $this->_reader = null;
        }

        return $this;
    }
83509
public function disconnect(): self
    {
        if ($this->isConnected()) {
            pg_close($this->resource);
            $this->resource = null;
        }

        return $this;
    }
703698
public function destroy()
    {
        $keys = [];

        foreach ($this->rows as $key => $row) {
            if ($this->rowStateIsNew($key)) {
                continue;
            }

            $keys[] = $this->rowFirstUnique($row);

            $this->markRowAsNew($key);
        }

        if ($keys) {
            [$sql, $params] = $this->newDeleteQuery()->where($this->firstUniqueKey(), $keys)->toSql();

            $this->connection()->sqlExecute($sql, $params);
        }

        return $this;
    }
93520
public function destroy($slug):Manager
    {
        $cartProducts = $this->getSession();
        $cartProducts->pull($slug);

        return $this;
    }
606451
public function destroy()
    {
        // Avoid repeated calls.
        if ($this->_status === self::STATUS_CLOSED) {
            return;
        }
        // Remove event listener.
        Worker::$globalEvent->del($this->_socket, EventInterface::EV_READ);
        Worker::$globalEvent->del($this->_socket, EventInterface::EV_WRITE);

        // Close socket.
        set_error_handler(function(){});
        fclose($this->_socket);
        restore_error_handler();

        $this->_status = self::STATUS_CLOSED;
        // Try to emit onClose callback.
        if ($this->onClose) {
            try {
                call_user_func($this->onClose, $this);
            } catch (\Exception $e) {
                Worker::log($e);
                exit(250);
            } catch (\Error $e) {
                Worker::log($e);
                exit(250);
            }
        }
        // Try to emit protocol::onClose
        if ($this->protocol && method_exists($this->protocol, 'onClose')) {
            try {
                call_user_func(array($this->protocol, 'onClose'), $this);
            } catch (\Exception $e) {
                Worker::log($e);
                exit(250);
            } catch (\Error $e) {
                Worker::log($e);
                exit(250);
            }
        }
        $this->_sendBuffer = $this->_recvBuffer = '';
        if ($this->_status === self::STATUS_CLOSED) {
            // Cleaning up the callback to avoid memory leaks.
            $this->onMessage = $this->onClose = $this->onError = $this->onBufferFull = $this->onBufferDrain = null;
            // Remove from worker->connections.
            if ($this->worker) {
                unset($this->worker->connections[$this->_id]);
            }
            unset(static::$connections[$this->_id]);
        }
    }
599099
public function remove()
    {
        $key = $this->request->param('ID');
        $item = null;
        $title = null;

        if (isset($key)) {
            $item = $this
                ->Items()
                ->find("Key", $key);
        }

        if (isset($item)) {
            $title = $item->Title;
            ShoppingCartFactory::create()->removeItem($item);

            $form = $this->CartForm();
            $form->sessionMessage(_t(
                "ShoppingCart.RemovedItem",
                "Removed '{title}' from your cart",
                ["title" => $title]
            ));
        }

        return $this->redirectBack();
    }
942598
public function clear(): self
    {
        $driver = $this->getDriver();
        $driver->clear();
        if ($this->hasEventListeners('clear')) {
            $this->dispatchEvent('clear');
        }
        return $this;
    }
571161
function destroy(){
		while( $Child = $this->pop() ){
			$Child->destroy();
		}	
		$Parent = $this->get_parent() and $Parent->remove( $this );
		unset( self::$reg[$this->idx] );
		$this->idx = null;
		return $Parent;
	}
1193567
public function Destroy () {
		$name = $this->__name;
		$names = & static::$meta->names;
		$hoops = & static::$meta->hoops;
		$expirations = & static::$meta->expirations;
		$instances = & static::$instances;
		if (isset($names[$name])) unset($names[$name]);
		if (isset($hoops[$name])) unset($hoops[$name]);
		if (isset($expirations[$name])) unset($expirations[$name]);
		if (isset($_SESSION[$name])) unset($_SESSION[$name]);
		if (isset($instances[$name])) unset($instances[$name]);
	}
860112
public function destroy()
	{
		// do we have something to destroy?
		if ( ! empty($this->keys))
		{
			// delete the key from the redis server
			$this->redis->del($this->keys['session_id']);
		}

		parent::destroy();

		return $this;
	}