From a894f470bd002eba13f4c43e08195a4ea355ff82 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Mon, 28 Nov 2011 10:19:11 +0100 Subject: [PATCH] Add an "autoload.php" utility script for autoloading in examples and tests. --- autoload.php | 13 +++++++++++++ examples/SharedConfigurations.php | 4 +--- test/bootstrap.php | 5 +---- 3 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 autoload.php diff --git a/autoload.php b/autoload.php new file mode 100644 index 00000000..cb0a37b4 --- /dev/null +++ b/autoload.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +require __DIR__.'/lib/Predis/Autoloader.php'; + +Predis\Autoloader::register(); diff --git a/examples/SharedConfigurations.php b/examples/SharedConfigurations.php index 5f568ae9..20ca6b5b 100644 --- a/examples/SharedConfigurations.php +++ b/examples/SharedConfigurations.php @@ -9,9 +9,7 @@ * file that was distributed with this source code. */ -require __DIR__.'/../lib/Predis/Autoloader.php'; - -Predis\Autoloader::register(); +require __DIR__.'/../autoload.php'; $single_server = array( 'host' => '127.0.0.1', diff --git a/test/bootstrap.php b/test/bootstrap.php index 48078693..3566dd55 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -9,8 +9,5 @@ * file that was distributed with this source code. */ -require __DIR__.'/../lib/Predis/Autoloader.php'; - -Predis\Autoloader::register(); - +require __DIR__.'/../autoload.php'; require __DIR__.'/PredisShared.php';