/** * Initializes MySQL specific mutex component implementation. * @throws InvalidConfigException if [[db]] is not MySQL connection. */ public function init() { parent::init(); if ($this->db->driverName !== 'mysql') { throw new InvalidConfigException('In order to use MysqlMutex connection must be configured to use MySQL database.'); } }
/** * Initializes Oracle specific mutex component implementation. * @throws InvalidConfigException if [[db]] is not Oracle connection. */ public function init() { parent::init(); if (strpos($this->db->driverName, 'oci') !== 0 && strpos($this->db->driverName, 'odbc') !== 0) { throw new InvalidConfigException('In order to use OracleMutex connection must be configured to use Oracle database.'); } }