protected function _getDb() { if (null === $this->_dbConnection) { $this->_dbConnection = Db::getInstance()->getPrimaryConnection(); } return $this->_dbConnection; }
protected function _getDb() { return Db::getInstance()->getPrimaryConnection(); }
private function _commandDiff() { $generator = $this->_getGenerator()->setFirstDataSource($this->_getDumper()->getState()); switch (VERSION_CONTROL_STRATEGY) { case "file": $generator->setSecondDataSource($this->_getLastSavedState()); break; case "database": $secondaryDumper = clone $this->_getDumper(); $secondaryDumper->setConnection(\Util\Db::getInstance()->getSecondaryConnection()); $generator->setSecondDataSource($secondaryDumper->getState()); break; default: throw new \Exception('Wrong version control strategy. Check .environment file VERSION_CONTROL_STRATEGY parameter'); } return $generator->getDiff(); }