]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorageInterface.php
MediaWiki 1.30.2-scripts
[autoinstallsdev/mediawiki.git] / vendor / justinrainbow / json-schema / src / JsonSchema / SchemaStorageInterface.php
diff --git a/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorageInterface.php b/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorageInterface.php
new file mode 100644 (file)
index 0000000..ddaf663
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+namespace JsonSchema;
+
+interface SchemaStorageInterface
+{
+    /**
+     * Adds schema with given identifier
+     *
+     * @param string $id
+     * @param object $schema
+     */
+    public function addSchema($id, $schema = null);
+
+    /**
+     * Returns schema for given identifier, or null if it does not exist
+     *
+     * @param string $id
+     *
+     * @return object
+     */
+    public function getSchema($id);
+
+    /**
+     * Returns schema for given reference with all sub-references resolved
+     *
+     * @param string $ref
+     *
+     * @return object
+     */
+    public function resolveRef($ref);
+
+    /**
+     * Returns schema referenced by '$ref' property
+     *
+     * @param mixed $refSchema
+     *
+     * @return object
+     */
+    public function resolveRefSchema($refSchema);
+}