From 01db8a8c51db3ca82014474e9c86ede15138762a Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Fri, 29 Apr 2016 10:45:51 -0300 Subject: [PATCH] Added support to configure commandClass in Connection; --- src/Connection.php | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/Connection.php b/src/Connection.php index 5d166a7..c14dfa8 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -21,28 +21,20 @@ class Connection extends \yii\db\Connection public $schemaMap = [ 'firebird' => 'edgardmessias\db\firebird\Schema', // Firebird ]; - public $pdoClass = 'edgardmessias\db\firebird\PdoAdapter'; /** - * @var Transaction the currently active transaction + * @inheritdoc */ - private $_transaction; + public $pdoClass = 'edgardmessias\db\firebird\PdoAdapter'; /** - * Creates a command for execution. - * @param string $sql the SQL statement to be executed - * @param array $params the parameters to be bound to the SQL statement - * @return Command the DB command + * @inheritdoc */ - public function createCommand($sql = null, $params = []) - { - $command = new Command([ - 'db' => $this, - 'sql' => $sql, - ]); - - return $command->bindValues($params); - } + public $commandClass = 'edgardmessias\db\firebird\Command'; + /** + * @var Transaction the currently active transaction + */ + private $_transaction; /** * Returns the currently active transaction.