ConfigIO.php 741 B

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