SetIntersectionStore.php 653 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Predis\Commands;
  3. class SetIntersectionStore extends Command
  4. {
  5. public function getId()
  6. {
  7. return 'SINTERSTORE';
  8. }
  9. protected function filterArguments(Array $arguments)
  10. {
  11. if (count($arguments) === 2 && is_array($arguments[1])) {
  12. return array_merge(array($arguments[0]), $arguments[1]);
  13. }
  14. return $arguments;
  15. }
  16. protected function onPrefixKeys(Array $arguments, $prefix)
  17. {
  18. return PrefixHelpers::multipleKeys($arguments, $prefix);
  19. }
  20. protected function canBeHashed()
  21. {
  22. return $this->checkSameHashForKeys($this->getArguments());
  23. }
  24. }