ServerSlaveOf.php 504 B

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