protected function setupAdapter($adapter) { if (!$adapter && !($adapter = $this->getAdapter()) && !($adapter = AdapterPool::get())) { throw new Exception\RuntimeException('Adapter must be setup'); } $this->setAdapter($adapter); }
/** * @param AdapterInterface $adapter * @param string|TableIdentifier $table */ public function __construct(AdapterInterface $adapter = null, $table = null) { if (!$adapter && !($adapter = AdapterPool::get())) { throw new Exception\RuntimeException('A adapter must be suplied'); } $this->adapter = $adapter; if ($table) { $this->setTable($table); } }