function __construct(\DBAL\Database $database, $input = null, $delegate = null) { $this->_platform = $database->getPlatform(); $this->_driver = $database->getDriver(); if (is_null($delegate)) { $delegate = 'fetchAssoc'; } if (is_string($delegate)) { $delegate = new \Core\Delegate($this->_driver, $delegate); } parent::__construct($delegate, $database->getConnection()); parent::setShared(true); if (!is_null($input)) { $this->setInput($input); } }
function setDatabase(\DBAL\Database $database) { $this->setStream($database->getConnection()); $this->database = $database; }