Просмотр исходного кода

Remove the 'on_connection_initialized' client option (useless in the vast majority of cases).

Daniele Alessandri 14 лет назад
Родитель
Сommit
e5ff0ab992
2 измененных файлов с 0 добавлено и 13 удалено
  1. 0 6
      lib/Predis/Client.php
  2. 0 7
      lib/Predis/ClientOptions.php

+ 0 - 6
lib/Predis/Client.php

@@ -59,12 +59,6 @@ class Client {
     private function createConnection($parameters) {
         $connection = $this->_schemes->newConnection($parameters);
         $this->pushInitCommands($connection);
-
-        $callback = $this->_options->on_connection_initialized;
-        if ($callback !== null) {
-            $callback($this, $connection);
-        }
-
         return $connection;
     }
 

+ 0 - 7
lib/Predis/ClientOptions.php

@@ -22,13 +22,6 @@ class ClientOptions {
         self::$_sharedOptions = array(
             'profile' => new ClientProfile(),
             'key_distribution' => new ClientKeyDistribution(),
-            'on_connection_initialized' => new CustomOption(array(
-                'validate' => function($value) {
-                    if (is_callable($value)) {
-                        return $value;
-                    }
-                },
-            )),
             'connections' => new CustomOption(array(
                 'default'  => function() {
                     return new ConnectionSchemes();