OptionsInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /*
  3. * This file is part of the Predis package.
  4. *
  5. * (c) Daniele Alessandri <suppakilla@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Predis\Configuration;
  11. /**
  12. * Defines an options container class.
  13. *
  14. * @author Daniele Alessandri <suppakilla@gmail.com>
  15. */
  16. interface OptionsInterface
  17. {
  18. /**
  19. * Returns the default value for the specified option.
  20. *
  21. * @param string $option Name of the option.
  22. * @return mixed
  23. */
  24. public function getDefault($option);
  25. /**
  26. * Checks if the specified option has been passed by
  27. * the user at construction time.
  28. *
  29. * @param string $option Name of the option.
  30. * @return bool
  31. */
  32. public function defined($option);
  33. /**
  34. * Checks if the specified option has been set and
  35. * does not evaluate to NULL.
  36. *
  37. * @param string $option Name of the option.
  38. * @return bool
  39. */
  40. public function __isset($option);
  41. /**
  42. * Returns the value of the specified option.
  43. *
  44. * @param string $option Name of the option.
  45. * @return mixed
  46. */
  47. public function __get($option);
  48. }