]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / justinrainbow / json-schema / src / JsonSchema / Uri / Retrievers / UriRetrieverInterface.php
diff --git a/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php b/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/UriRetrieverInterface.php
new file mode 100644 (file)
index 0000000..2cc40cf
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+/*
+ * This file is part of the JsonSchema package.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace JsonSchema\Uri\Retrievers;
+
+/**
+ * Interface for URI retrievers
+ *
+ * @author Sander Coolen <sander@jibber.nl>
+ */
+interface UriRetrieverInterface
+{
+    /**
+     * Retrieve a schema from the specified URI
+     *
+     * @param string $uri URI that resolves to a JSON schema
+     *
+     * @throws \JsonSchema\Exception\ResourceNotFoundException
+     *
+     * @return mixed string|null
+     */
+    public function retrieve($uri);
+
+    /**
+     * Get media content type
+     *
+     * @return string
+     */
+    public function getContentType();
+}