protected function _checkAdapter()
    {
        $notDefined = !is_object($this->_adapter);
        $isAdapter = $this->_adapter instanceof AdapterInterface;

        if ($notDefined || !$isAdapter) {
            throw new InvalidArgumentException(
                "You need to set the database adapter for this schema loader."
            );
        }
    }