ParametersInterface.php 975 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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\Connection;
  11. /**
  12. * Interface for classes providing their own logic for connection parameters.
  13. *
  14. * @author Daniele Alessandri <suppakilla@gmail.com>
  15. */
  16. interface ParametersInterface
  17. {
  18. /**
  19. * Checks if the specified parameters is set.
  20. *
  21. * @param string $parameter Name of the parameter.
  22. * @return bool
  23. */
  24. public function __isset($parameter);
  25. /**
  26. * Returns the value of the specified parameter.
  27. *
  28. * @param string $parameter Name of the parameter.
  29. * @return mixed
  30. */
  31. public function __get($parameter);
  32. /**
  33. * Returns an array representation of the connection parameters.
  34. *
  35. * @return array
  36. */
  37. public function toArray();
  38. }