ConfigIO.php 694 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Interface ConfigIO
  4. *
  5. * This describes how Config types should store their configuration.
  6. */
  7. interface ConfigIO
  8. {
  9. /**
  10. * Read configuration.
  11. *
  12. * @param string $filepath Config file absolute path.
  13. *
  14. * @return array All configuration in an array.
  15. */
  16. function read($filepath);
  17. /**
  18. * Write configuration.
  19. *
  20. * @param string $filepath Config file absolute path.
  21. * @param array $conf All configuration in an array.
  22. */
  23. function write($filepath, $conf);
  24. /**
  25. * Get config file extension according to config type.
  26. *
  27. * @return string Config file extension.
  28. */
  29. function getExtension();
  30. }