Explorar el Código

Casting a instance of Predis\RedisServerProfile to string returns its associated version string.

Daniele Alessandri hace 15 años
padre
commit
9dae351819
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      lib/Predis.php

+ 4 - 0
lib/Predis.php

@@ -807,6 +807,10 @@ abstract class RedisServerProfile {
             $this->_registeredCommands[$aliases] = $command;
         }
     }
+
+    public function __toString() {
+        return $this->getVersion();
+    }
 }
 
 class RedisServer__V1_0 extends RedisServerProfile {