private function connect () {
        if ($this->isConnected()) {
            return;
        }

        parent::__construct(
            $this->data_source->getDSN(),
            $this->data_source->getUser(),
            $this->data_source->getPassword(),
            $this->data_source->getDriverOptions()
        );

        parent::setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
        parent::setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        parent::setAttribute(\PDO::ATTR_STATEMENT_CLASS, ['Gajus\Doll\PDOStatement', [$this]]);
        parent::setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);

        $this->is_connected = true;

        foreach ($this->attributes as $attribute => $value) {
            $this->setAttribute($attribute, $value);
        }

        if ($this->getAttribute(\Gajus\Doll\PDO::ATTR_LOGGING)) {
            parent::exec('SET `profiling` = 1');
            parent::exec('SET `profiling_history_size` = 100');
        }
    }
private function connect () {
        if ($this->isConnected()) {
            return;
        }

        parent::__construct(
            $this->data_source->getDSN(),
            $this->data_source->getUser(),
            $this->data_source->getPassword(),
            $this->data_source->getDriverOptions()
        );

        parent::setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
        parent::setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
        parent::setAttribute(\PDO::ATTR_STATEMENT_CLASS, ['Gajus\Doll\PDOStatement', [$this]]);
        parent::setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);

        $this->is_connected = true;

        foreach ($this->attributes as $attribute => $value) {
            $this->setAttribute($attribute, $value);
        }

        if ($this->getAttribute(\Gajus\Doll\PDO::ATTR_LOGGING)) {
            parent::exec('SET `profiling` = 1');
            parent::exec('SET `profiling_history_size` = 100');
        }
    }
private function connect ( ) { if ( $ this -> isConnected ( ) ) { return ; } parent :: __construct ( $ this -> data_source -> getDSN ( ) , $ this -> data_source -> getUser ( ) , $ this -> data_source -> getPassword ( ) , $ this -> data_source -> getDriverOptions ( ) ) ; parent :: setAttribute ( \ PDO :: ATTR_EMULATE_PREPARES , false ) ; parent :: setAttribute ( \ PDO :: ATTR_ERRMODE , \ PDO :: ERRMODE_EXCEPTION ) ; parent :: setAttribute ( \ PDO :: ATTR_STATEMENT_CLASS , [ 'Gajus\Doll\PDOStatement' , [ $ this ] ] ) ; parent :: setAttribute ( \ PDO :: ATTR_DEFAULT_FETCH_MODE , \ PDO :: FETCH_ASSOC ) ; $ this -> is_connected = true ; foreach ( $ this -> attributes as $ attribute => $ value ) { $ this -> setAttribute ( $ attribute , $ value ) ; } if ( $ this -> getAttribute ( \ Gajus \ Doll \ PDO :: ATTR_LOGGING ) ) { parent :: exec ( 'SET `profiling` = 1' ) ; parent :: exec ( 'SET `profiling_history_size` = 100' ) ; } }
Connect to the database using the constructor parameter and attributes
that were collected prior to triggering connection to the database.

@return null
Connect to the database using the constructor parameter and attributes that were collected prior to triggering connection to the database .