Web Interfaces of PROSUME

SchemaStorageInterface.php 802B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace JsonSchema;
  3. interface SchemaStorageInterface
  4. {
  5. /**
  6. * Adds schema with given identifier
  7. *
  8. * @param string $id
  9. * @param object $schema
  10. */
  11. public function addSchema($id, $schema = null);
  12. /**
  13. * Returns schema for given identifier, or null if it does not exist
  14. *
  15. * @param string $id
  16. *
  17. * @return object
  18. */
  19. public function getSchema($id);
  20. /**
  21. * Returns schema for given reference with all sub-references resolved
  22. *
  23. * @param string $ref
  24. *
  25. * @return object
  26. */
  27. public function resolveRef($ref);
  28. /**
  29. * Returns schema referenced by '$ref' property
  30. *
  31. * @param mixed $refSchema
  32. *
  33. * @return object
  34. */
  35. public function resolveRefSchema($refSchema);
  36. }