Bläddra i källkod

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

Daniele Alessandri 15 år sedan
förälder
incheckning
9dae351819
1 ändrade filer med 4 tillägg och 0 borttagningar
  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 {