Completed
Pull Request — master (#11)
by Elisha-Wigwe Chijioke
03:03
created

PotatoConnector   A

Complexity

Total Complexity 23

Size/Duplication

Total Lines 242
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 23
Bugs 8 Features 9
Metric Value
wmc 23
c 23
b 8
f 9
lcom 1
cbo 2
dl 0
loc 242
rs 10

16 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
A setConnection() 0 7 1
A connect() 0 11 2
A connectDriver() 0 20 3
A mysqlConnect() 0 6 1
A sqliteConnect() 0 7 2
A getSqliteFile() 0 6 1
A getConfigurations() 0 6 2
A getConfigFilePath() 0 4 2
A getAdaptar() 0 4 1
A getHost() 0 4 1
A getDBName() 0 4 1
A getUsername() 0 4 1
A getPassword() 0 4 1
A throwFaultyConnectionException() 0 4 1
A throwInvalidAdapterException() 0 5 1
1
<?php
2
3
namespace Elchroy\PotatoORM;
4
5
use Elchroy\PotatoORMExceptions\FaultyConnectionException;
6
use Elchroy\PotatoORMExceptions\InvalidAdaptarException;
7
use PDO;
8
use PDOException;
9
10
class PotatoConnector
11
{
12
    /**
13
     * [$connection PDO connection to be used to communicate with the database].
14
     *
15
     * @var [type] PDO Connection
16
     */
17
    public $connection;
18
19
    /**
20
     * [$configuration The configuration data to be used to establish the connection].
21
     *
22
     * @var [type]
23
     */
24
    public $configuration;
25
26
    /**
27
     * [__construct Set up the connection with the configuration data that is provided on instantiation of the class.].
28
     *
29
     * @param array|null $configData [description]
30
     */
31
    public function __construct(array $configData = null)
32
    {
33
        $configData == null ? $config = $this->getConfigurations() : $config = $configData;
34
        $this->configuration = $config;
35
        $this->connection = $this->setConnection();
36
    }
37
38
    /**
39
     * [setConnection Set up the connection with the configuration information].
40
     */
41
    public function setConnection()
42
    {
43
        $adaptar = $this->getAdaptar();
44
        $connection = $this->connect($adaptar);
45
46
        return $connection;
47
    }
48
49
    /**
50
     * [connect Try setting up the connection wtith given connection parameters].
51
     *
52
     * @param [string] $adaptar  [The adapter to be used witht he connection to the database]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
53
     * @param [string] $host     [The host name for the connection]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $host. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
54
     * @param [string] $dbname   [The name of the database]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $dbname. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
55
     * @param [string] $username [The username to be used if it is required]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $username. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
56
     * @param [string] $password [The [assword to be used for the connectionif required.]]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $password. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
57
     *
58
     * @return [type] [A PDO connection to the databsase]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
59
     */
60
    public function connect($adaptar)
61
    {
62
        try {
63
            $connection = $this->connectDriver($adaptar);
64
        } catch (PDOException $e) {
65
            $message = $e->getMessage();
66
            $this->throwFaultyConnectionException($message);
67
        }
68
69
        return $connection;
70
    }
71
72
    /**
73
     * [connectDriver Check which driver is chosen and create a PDO connection based on the driver information.]
74
     * Throw an InvalidAdaptarException if the given driver is invalid, does not exist or is not compatible with PDO.
75
     *
76
     * @param [string] $adaptar  [The adaptar/driver name used to create PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
77
     * @param [string] $host     [The hostname to be used for the PDO connection if mysql is chosen.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $host. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
78
     * @param [string] $dbname   [The name of the database of the PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $dbname. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
79
     * @param [string] $username [The username to be used for the PDO connection if mysql is chosen.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $username. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
80
     * @param [string] $password [The password to be used for the PDO connection id mysql is chosen.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $password. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
81
     *
82
     * @return [type] [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
83
     */
84
    public function connectDriver($adaptar)
85
    {
86
        switch ($adaptar) {
87
            case 'sqlite':
88
                $connection = $this->sqliteConnect($adaptar);
89
                break;
90
            case 'mysql':
91
                $host = $this->getHost();
92
                $dbname = $this->getDBName();
93
                $username = $this->getUsername();
94
                $password = $this->getPassword();
95
                $connection = $this->mysqlConnect($adaptar, $host, $dbname, $username, $password);
96
                break;
97
            default:
98
                $this->throwInvalidAdapterException($adaptar);
99
        }
100
        $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
0 ignored issues
show
Bug introduced by
The variable $connection does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
101
102
        return $connection;
103
    }
104
105
    /**
106
     * [mysqlConnect Create a MySQL PDO connection with the mysql driver.].
107
     *
108
     * @param [string] $adaptar  [The adaptar name used to create PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
109
     * @param [string] $host     [The hostname to be used for the PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
110
     * @param [string] $dbname   [The name of the database of the PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
111
     * @param [string] $username [The username to be used for the PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
112
     * @param [string] $password [The password to be used for the PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
113
     *
114
     * @return [type] A PDO connection done with a mysql driver
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
115
     */
116
    public function mysqlConnect($adaptar, $host, $dbname, $username, $password)
117
    {
118
        $connection = new PDO("$adaptar:host=$host;dbname=$dbname", $username, $password);
119
120
        return $connection;
121
    }
122
123
    /**
124
     * [sqliteConnect Create an SQLite connection if the selected PDO drver is sqlite.].
125
     *
126
     * @param [string] $adaptar The sqlite driver name
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
127
     * @param [type]   $dbFile  [The database file. If this is null, then get the database file using the getSqliteFile method.]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
128
     *
129
     * @return [type] A PDO connection done with am sqlite driver.
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
130
     */
131
    public function sqliteConnect($adaptar, $dbFile = null)
0 ignored issues
show
Unused Code introduced by
The parameter $adaptar is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
132
    {
133
        $dbFile = $dbFile == null ? $this->getSqliteFile() : $dbFile;
134
        $connection = new PDO("sqlite:../$dbFile");
135
136
        return $connection;
137
    }
138
139
    /**
140
     * [getSqliteFile Get the file location of the slqlite file if it is preferred to use an sqlite pdo connection.].
141
     *
142
     * @param [type] $path [The path to the sqlite database file.]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
Bug introduced by
There is no parameter named $path. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
143
     *
144
     * @return [type] [The path to the sqlite file if provided or a default file path if the path in the provided argument is null.]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
145
     */
146
    public function getSqliteFile()
147
    {
148
        $path = $this->configuration['sqlite_file'];
149
150
        return $path;
151
    }
152
153
    /**
154
     * [getConfigurations Get the configuration data from the file path].
155
     *
156
     * @param [type] $filepath [The file path where the connection configuration information are located.]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
157
     *
158
     * @return [array] [An array of the configuration information after parsing the information.]
0 ignored issues
show
Documentation introduced by
The doc-type [array] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
159
     */
160
    public function getConfigurations($filepath = null)
161
    {
162
        $file = ($filepath == null ? $this->getConfigFilePath() : $filepath);
163
164
        return parse_ini_file($file);
165
    }
166
167
    /**
168
     * [getConfigFilePath Get the file path of the file where the configuration lies.].
169
     *
170
     * @return [string] [The file path of the location where the confuiguration information lie.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
171
     */
172
    public function getConfigFilePath($path = null)
173
    {
174
        return $path == null ? __DIR__.'/../config.ini' : $path;
175
    }
176
177
    /**
178
     * [getAdaptar Get the name of the adapter to be used for the connection.].
179
     *
180
     * @return [string] [The name of the adapter.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
181
     */
182
    public function getAdaptar()
183
    {
184
        return $this->configuration['adaptar'];
185
    }
186
187
    /**
188
     * [getHost Get the name of the host to be used for the connection.].
189
     *
190
     * @return [string] [The name of the host.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
191
     */
192
    public function getHost()
193
    {
194
        return $this->configuration['host'];
195
    }
196
197
    /**
198
     * [getDBName Get the name of the database where information/data will eb stored.].
199
     *
200
     * @return [string] [The name of the database.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
201
     */
202
    public function getDBName()
203
    {
204
        return $this->configuration['dbname'];
205
    }
206
207
    /**
208
     * [getUsername Get the username for the connection to the database.].
209
     *
210
     * @return [string] [The username for the connection to the database.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
211
     */
212
    public function getUsername()
213
    {
214
        return $this->configuration['username'];
215
    }
216
217
    /**
218
     * [getPassword Get the password of the user of the connection.].
219
     *
220
     * @return [string] [The passwird of the user.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
221
     */
222
    public function getPassword()
223
    {
224
        return $this->configuration['password'];
225
    }
226
227
    /**
228
     * [throwFaultyConnectionException Throw an exception if along the lime the connection is not setup correctly].
229
     *
230
     * @param [string] $message [The message to be related in event of this exception.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
231
     *
232
     * @return [type] [An inherited PDO exception with a customized message.]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
233
     */
234
    public function throwFaultyConnectionException($message)
235
    {
236
        throw new FaultyConnectionException($message);
237
    }
238
239
    /**
240
     * [throwInvalidAdapterException Throw an exception if the adapter or driver is invalid, does not exist or is not supported by PDO.
241
     *
242
     * @param [string] $adaptar [The adaptar that should be used for the PDO connection.]
0 ignored issues
show
Documentation introduced by
The doc-type [string] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
243
     *
244
     * @return [type] [An inherited PDO exception with a customized message.]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
245
     */
246
    public function throwInvalidAdapterException($adaptar)
247
    {
248
        $message = "Invalid Adapter $adaptar : Please provide a driver for the connection to the database.";
249
        throw new InvalidAdaptarException($message);
250
    }
251
}
252