You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
php-fedora-autoloader/php-fedora-autoloader-pull-...

38 lines
1.2 KiB

From f7e0a058af4c34067931687206b62a5a8ecbcb1b Mon Sep 17 00:00:00 2001
From: Shawn Iwinski <siwinski@redhat.com>
Date: Thu, 27 Oct 2016 13:36:57 -0400
Subject: [PATCH] Remove self-autoload constant
---
src/autoload.php | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/autoload.php b/src/autoload.php
index e275e62..e876745 100644
--- a/src/autoload.php
+++ b/src/autoload.php
@@ -7,16 +7,12 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
-if (!defined('FEDORA_AUTOLOADER')) {
- if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
- require_once __DIR__.'/Autoload.php';
- }
-
- if (!function_exists('Fedora\\Autoloader\\requireFile')) {
- require_once __DIR__.'/functions.php';
- }
-
- \Fedora\Autoloader\Autoload::addPsr4('Fedora\\Autoloader\\', __DIR__);
+if (!class_exists('Fedora\\Autoloader\\Autoload', false)) {
+ require_once __DIR__.'/Autoload.php';
+}
- define('FEDORA_AUTOLOADER', true);
+if (!function_exists('Fedora\\Autoloader\\requireFile')) {
+ require_once __DIR__.'/functions.php';
}
+
+\Fedora\Autoloader\Autoload::addPsr4('Fedora\\Autoloader\\', __DIR__, true);