/**
  * {@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();
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function initialize()
 {
     if ($this->isInitialized == true) {
         return;
     }
     parent::initialize();
     $rowObject = $this->resultSetPrototype->getArrayObjectPrototype();
     if (is_callable(array($rowObject, 'setTableGateway'))) {
         $rowObject->setTableGateway($this);
     }
 }