Bläddra i källkod

Add an "autoload.php" utility script for autoloading in examples and tests.

Daniele Alessandri 13 år sedan
förälder
incheckning
a894f470bd
3 ändrade filer med 15 tillägg och 7 borttagningar
  1. 13 0
      autoload.php
  2. 1 3
      examples/SharedConfigurations.php
  3. 1 4
      test/bootstrap.php

+ 13 - 0
autoload.php

@@ -0,0 +1,13 @@
+<?php
+/*
+ * This file is part of the Predis package.
+ *
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
+ *
+ * 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();

+ 1 - 3
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',

+ 1 - 4
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';