1 | <?php |
||
17 | class Connection extends \yii\db\Connection |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @inheritdoc |
||
22 | */ |
||
23 | public $commandClass = 'edgardmessias\db\ibm\db2\Command'; |
||
24 | |||
25 | /** |
||
26 | * @var bool|null set to true if working on iSeries |
||
27 | */ |
||
28 | |||
29 | public $isISeries = null; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @var string need to be set if isISeries is set to true |
||
34 | */ |
||
35 | |||
36 | public $defaultSchema; |
||
37 | |||
38 | |||
39 | /** |
||
40 | * @var array PDO attributes (name => value) that should be set when calling [[open()]] |
||
41 | * to establish a DB connection. Please refer to the |
||
42 | * [PHP manual](http://www.php.net/manual/en/function.PDO-setAttribute.php) for |
||
43 | * details about available attributes. |
||
44 | */ |
||
45 | public $attributes = [ |
||
46 | PDO::ATTR_CASE => PDO::CASE_NATURAL, |
||
47 | PDO::ATTR_STRINGIFY_FETCHES => true, |
||
48 | ]; |
||
49 | |||
50 | /** |
||
51 | * @var array mapping between PDO driver names and [[Schema]] classes. |
||
52 | * The keys of the array are PDO driver names while the values the corresponding |
||
53 | * schema class name or configuration. Please refer to [[Yii::createObject()]] for |
||
54 | * details on how to specify a configuration. |
||
55 | * |
||
56 | * This property is mainly used by [[getSchema()]] when fetching the database schema information. |
||
57 | * You normally do not need to set this property unless you want to use your own |
||
58 | * [[Schema]] class to support DBMS that is not supported by Yii. |
||
59 | */ |
||
60 | public $schemaMap = [ |
||
61 | 'ibm' => 'edgardmessias\db\ibm\db2\Schema', // IBM DB2 |
||
62 | 'odbc' => 'edgardmessias\db\ibm\db2\Schema', // IBM DB2 ODBC |
||
63 | ]; |
||
64 | |||
65 | /** |
||
66 | * Initializes the DB connection. |
||
67 | * This method is invoked right after the DB connection is established. |
||
68 | * The default implementation turns on `PDO::ATTR_EMULATE_PREPARES` |
||
69 | * if [[emulatePrepare]] is true, and sets the database [[charset]] if it is not empty. |
||
70 | * It then triggers an [[EVENT_AFTER_OPEN]] event. |
||
71 | */ |
||
72 | protected function initConnection() |
||
89 | |||
90 | } |
||
91 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.