PageRenderTime 55ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/LinkPhase.php

https://bitbucket.org/intel352/riiak
PHP | 42 lines | 19 code | 6 blank | 17 comment | 0 complexity | 25595067bd4887575d761c9bb0cb5fb8 MD5 | raw file
Possible License(s): Apache-2.0
  1. <?php
  2. namespace riiak;
  3. use \CComponent;
  4. /**
  5. * The LinkPhase object holds information about a Link phase in a
  6. * map/reduce operation.
  7. * @package riiak
  8. */
  9. class LinkPhase extends CComponent {
  10. public $bucket;
  11. public $tag;
  12. public $keep;
  13. /**
  14. * Construct a LinkPhase object
  15. *
  16. * @param string $bucket The bucket name
  17. * @param string $tag The tag
  18. * @param bool $keep True to return results of this phase
  19. */
  20. public function __construct($bucket, $tag, $keep) {
  21. $this->bucket = $bucket;
  22. $this->tag = $tag;
  23. $this->keep = $keep;
  24. }
  25. /**
  26. * Convert the LinkPhase to an associative array. Used internally.
  27. *
  28. * @return array
  29. */
  30. public function toArray() {
  31. $stepdef = array('bucket' => $this->bucket,
  32. 'tag' => $this->tag,
  33. 'keep' => $this->keep);
  34. return array('link' => $stepdef);
  35. }
  36. }