protected function getStorageGateway() { if (!isset($this->storageGateway)) { $this->storageGateway = new LegacyStorage(); $this->storageGateway->setConnection($this->getDatabaseHandler()); } return $this->storageGateway; }