config['dsn']); } // Keep this for manual triggering if needed public function _delayedInitialize() { return parent::_initialize(); } public function _getDbHostname() { $matches = []; $matched = preg_match('~host=([^;]+)~s', $this->config['dsn'], $matches); return $matched ? $matches[1] : false; } public function _getDbName() { $matches = []; $matched = preg_match('~dbname=([^;]+)~s', $this->config['dsn'], $matches); return $matched ? $matches[1] : false; } public function _getDbUsername() { return $this->config['user']; } public function _getDbPassword() { return $this->config['password']; } }