/** * {@inheritDoc} */ public function initialize() { if ($this->initialized == true) { return; } if (!$this->masterAdapter && !$this->slaveAdapter) { throw new \Exception('Master/Slave adapters must be configured in initialize()'); } $this->adapter = $this->adapter ?: $this->slaveAdapter; parent::initialize(); }
/** * {@inheritDoc} */ public function initialize() { if ($this->isInitialized == true) { return; } parent::initialize(); $rowObject = $this->resultSetPrototype->getArrayObjectPrototype(); if (is_callable(array($rowObject, 'setTableGateway'))) { $rowObject->setTableGateway($this); } }