protected function validateDbConnectInstall()
    {
        if ($this->isError()) {
            return null;
        }

        $field = 'database.connect';

        if ($this->isExcluded($field)) {
            return null;
        }

        $settings = $this->getSubmitted('database');
        $result = $this->install->connectDb($settings);

        if ($result === true) {
            return true;
        }

        if (empty($result)) {
            $result = $this->translation->text('Could not connect to database');
        }

        $this->setError($field, (string) $result);
        return false;
    }
protected function validateDbConnectInstall()
    {
        if ($this->isError()) {
            return null;
        }

        $field = 'database.connect';

        if ($this->isExcluded($field)) {
            return null;
        }

        $settings = $this->getSubmitted('database');
        $result = $this->install->connectDb($settings);

        if ($result === true) {
            return true;
        }

        if (empty($result)) {
            $result = $this->translation->text('Could not connect to database');
        }

        $this->setError($field, (string) $result);
        return false;
    }
protected function validateDbConnectInstall ( ) { if ( $ this -> isError ( ) ) { return null ; } $ field = 'database.connect' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ settings = $ this -> getSubmitted ( 'database' ) ; $ result = $ this -> install -> connectDb ( $ settings ) ; if ( $ result === true ) { return true ; } if ( empty ( $ result ) ) { $ result = $ this -> translation -> text ( 'Could not connect to database' ) ; } $ this -> setError ( $ field , ( string ) $ result ) ; return false ; }
Validates database connection
@return boolean
Validates database connection