protected function canExecute($command)
    {

        if (!$this->active) {
            throw new OrientDBWrongCommandException('DBClose was executed. No interaction is possible.');
        }
        if (in_array($command->opType, $this->getCommandsRequiresConnect()) && !$this->isConnected()) {
            throw new OrientDBWrongCommandException('Not connected to server');
        }
        if (in_array($command->opType, $this->getCommandsRequiresDBOpen()) && !$this->isDBOpen()) {
            throw new OrientDBWrongCommandException('Database not open');
        }
    }
protected function canExecute($command)
    {

        if (!$this->active) {
            throw new OrientDBWrongCommandException('DBClose was executed. No interaction is possible.');
        }
        if (in_array($command->opType, $this->getCommandsRequiresConnect()) && !$this->isConnected()) {
            throw new OrientDBWrongCommandException('Not connected to server');
        }
        if (in_array($command->opType, $this->getCommandsRequiresDBOpen()) && !$this->isDBOpen()) {
            throw new OrientDBWrongCommandException('Database not open');
        }
    }
protected function canExecute ( $ command ) { if ( ! $ this -> active ) { throw new OrientDBWrongCommandException ( 'DBClose was executed. No interaction is possible.' ) ; } if ( in_array ( $ command -> opType , $ this -> getCommandsRequiresConnect ( ) ) && ! $ this -> isConnected ( ) ) { throw new OrientDBWrongCommandException ( 'Not connected to server' ) ; } if ( in_array ( $ command -> opType , $ this -> getCommandsRequiresDBOpen ( ) ) && ! $ this -> isDBOpen ( ) ) { throw new OrientDBWrongCommandException ( 'Database not open' ) ; } }
Check if command's requirements are met
@param OrientDBCommandAbstract $command Command instance
@throws OrientDBWrongCommandException
@see OrientDBCommandAbstract
Check if command s requirements are met