KeyDelete.php 616 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Predis\Commands;
  3. use Predis\Helpers;
  4. class KeyDelete extends Command {
  5. public function getId() {
  6. return 'DEL';
  7. }
  8. protected function filterArguments(Array $arguments) {
  9. return Helpers::filterArrayArguments($arguments);
  10. }
  11. protected function onPrefixKeys(Array $arguments, $prefix) {
  12. return PrefixHelpers::multipleKeys($arguments, $prefix);
  13. }
  14. protected function canBeHashed() {
  15. $args = $this->getArguments();
  16. if (count($args) === 1) {
  17. return true;
  18. }
  19. return $this->checkSameHashForKeys($args);
  20. }
  21. }