RequestInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace Gogs\API\Request {
  3. /**
  4. * Request interface, used by any kind of request object.
  5. *
  6. * @author Joachim M. Giaever (joachim[]giaever.org)
  7. * @version 0.1
  8. */
  9. interface RequestInterface {
  10. /**
  11. * Load object.
  12. *
  13. * @todo reconsider $force = false
  14. * @param bool $force Force update, default: true
  15. * @return object
  16. */
  17. public function load(bool $force = false);
  18. /**
  19. * Get by identifier
  20. *
  21. * @param string $s The idientifier to look up
  22. * @return object
  23. */
  24. public function get(string $s);
  25. /**
  26. * Create object
  27. *
  28. * @param ... $args Arguments required by create.
  29. * @return bool
  30. */
  31. public function create(...$args);
  32. /**
  33. * Patch (update) object
  34. *
  35. * @return bool
  36. */
  37. public function patch();
  38. /**
  39. * Delete object
  40. *
  41. * @return bool
  42. */
  43. public function delete();
  44. }
  45. }
  46. ?>