ConnectionParametersInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 that must be implemented by classes that provide their own mechanism
  13. * to parse and handle connection parameters.
  14. *
  15. * @author Daniele Alessandri <suppakilla@gmail.com>
  16. */
  17. interface ConnectionParametersInterface
  18. {
  19. /**
  20. * Checks if the specified parameters is set.
  21. *
  22. * @param string $property Name of the property.
  23. * @return Boolean
  24. */
  25. public function __isset($parameter);
  26. /**
  27. * Returns the value of the specified parameter.
  28. *
  29. * @param string $parameter Name of the parameter.
  30. * @return mixed
  31. */
  32. public function __get($parameter);
  33. /**
  34. * Returns an array representation of the connection parameters.
  35. *
  36. * @return array
  37. */
  38. public function toArray();
  39. }