ResponseQueued.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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;
  11. /**
  12. * Represents a +QUEUED response returned by Redis as a reply to each command
  13. * executed inside a MULTI/ EXEC transaction.
  14. *
  15. * @author Daniele Alessandri <suppakilla@gmail.com>
  16. */
  17. class ResponseQueued implements IReplyObject
  18. {
  19. /**
  20. * Converts the object to its string representation.
  21. *
  22. * @return string
  23. */
  24. public function __toString()
  25. {
  26. return 'QUEUED';
  27. }
  28. /**
  29. * Returns the value of the specified property.
  30. *
  31. * @param string $property Name of the property.
  32. * @return mixed
  33. */
  34. public function __get($property)
  35. {
  36. return $property === 'queued';
  37. }
  38. /**
  39. * Checks if the specified property is set.
  40. *
  41. * @param string $property Name of the property.
  42. * @return Boolean
  43. */
  44. public function __isset($property)
  45. {
  46. return $property === 'queued';
  47. }
  48. }