public function delete($key = null)
    {
        if (!$this->isInitialized()) {
            return false;
        }

        if (!isset($key)) {

            session_unset();

            if (!session_destroy()) {
                throw new RuntimeException('Failed to delete the session');
            }

            return true;
        }

        gplcart_array_unset($_SESSION, $key);
        return true;
    }
public function delete($key = null)
    {
        if (!$this->isInitialized()) {
            return false;
        }

        if (!isset($key)) {

            session_unset();

            if (!session_destroy()) {
                throw new RuntimeException('Failed to delete the session');
            }

            return true;
        }

        gplcart_array_unset($_SESSION, $key);
        return true;
    }
public function delete ( $ key = null ) { if ( ! $ this -> isInitialized ( ) ) { return false ; } if ( ! isset ( $ key ) ) { session_unset ( ) ; if ( ! session_destroy ( ) ) { throw new RuntimeException ( 'Failed to delete the session' ) ; } return true ; } gplcart_array_unset ( $ _SESSION , $ key ) ; return true ; }
Deletes a data from the session
@param mixed $key
@return bool
@throws RuntimeException
Deletes a data from the session