ServerSlaveOf.php 524 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Predis\Commands;
  3. class ServerSlaveOf extends Command
  4. {
  5. public function getId()
  6. {
  7. return 'SLAVEOF';
  8. }
  9. protected function filterArguments(Array $arguments)
  10. {
  11. if (count($arguments) === 0 || $arguments[0] === 'NO ONE') {
  12. return array('NO', 'ONE');
  13. }
  14. return $arguments;
  15. }
  16. protected function onPrefixKeys(Array $arguments, $prefix)
  17. {
  18. /* NOOP */
  19. }
  20. protected function canBeHashed()
  21. {
  22. return false;
  23. }
  24. }