Repository.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace Illuminate\Contracts\Config;
  3. interface Repository
  4. {
  5. /**
  6. * Determine if the given configuration value exists.
  7. *
  8. * @param string $key
  9. * @return bool
  10. */
  11. public function has($key);
  12. /**
  13. * Get the specified configuration value.
  14. *
  15. * @param array|string $key
  16. * @param mixed $default
  17. * @return mixed
  18. */
  19. public function get($key, $default = null);
  20. /**
  21. * Get all of the configuration items for the application.
  22. *
  23. * @return array
  24. */
  25. public function all();
  26. /**
  27. * Set a given configuration value.
  28. *
  29. * @param array|string $key
  30. * @param mixed $value
  31. * @return void
  32. */
  33. public function set($key, $value = null);
  34. /**
  35. * Prepend a value onto an array configuration value.
  36. *
  37. * @param string $key
  38. * @param mixed $value
  39. * @return void
  40. */
  41. public function prepend($key, $value);
  42. /**
  43. * Push a value onto an array configuration value.
  44. *
  45. * @param string $key
  46. * @param mixed $value
  47. * @return void
  48. */
  49. public function push($key, $value);
  50. }