protected function newConnection(array $row) { $config = !empty($row['config']) ? ConnectionService::decryptConfig($row['config'], $this->secretKey) : []; $connection = new Connection(); $connection->setId($row['id']); $connection->setName($row['name']); $connection->setClass($row['class']); $connection->setConfig($config); return $connection; }