getParam('url'); // Only try to extract metadata from URL with HTTP(s) scheme if (!empty($url) && strpos(get_url_scheme($url) ?: '', 'http') !== false) { return $response->withJson($this->container->metadataRetriever->retrieve($url)); } return $response->withJson([]); } }