public function getWriteResource()
{
if ($this->writeResource === null) {
// get the \Zend_Db_Adapter_Abstract not the wrapper
try {
$this->writeResource = Db::getConnection(true, true);
} catch (\Exception $e) {
$this->writeResource = false;
}
}
if ($this->writeResource !== false) {
return $this->writeResource;
}
// use the default connection if we don't have a dedicated write connection config
return $this->getResource();
}