Phalcon\Session\Adapter\Mongo::destroy PHP Method

destroy() public method

public destroy ( $sessionId = null )
    public function destroy($sessionId = null)
    {
        if (is_null($sessionId)) {
            $sessionId = $this->getId();
        }
        $this->data = null;
        $remove = $this->getCollection()->remove(['_id' => $sessionId]);
        return (bool) $remove['ok'];
    }