protected function resolveFromGaufretteAdapter($id, GaufretteAdapter $adapter) { /** @todo Support other adapters */ if ($adapter instanceof GaufretteAdapter\AwsS3) { $id = $adapter->getUrl($id); } else { throw new RuntimeException(sprintf('Gaufrette adapter of type "%s" is not supported', get_class($adapter))); } return $id; }