From e5ff0ab992d5284d0e1ba57ecf08549b8c8241cf Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Fri, 18 Mar 2011 21:47:52 +0100 Subject: [PATCH] Remove the 'on_connection_initialized' client option (useless in the vast majority of cases). --- lib/Predis/Client.php | 6 ------ lib/Predis/ClientOptions.php | 7 ------- 2 files changed, 13 deletions(-) diff --git a/lib/Predis/Client.php b/lib/Predis/Client.php index 10fcc0fb..ab728e37 100644 --- a/lib/Predis/Client.php +++ b/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; } diff --git a/lib/Predis/ClientOptions.php b/lib/Predis/ClientOptions.php index b624f478..8075386d 100644 --- a/lib/Predis/ClientOptions.php +++ b/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();