summaryrefslogtreecommitdiffstats
path: root/php-icewind-smb-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-12-08 11:03:48 +0100
committerRemi Collet <fedora@famillecollet.com>2016-12-08 11:03:48 +0100
commit8ee2b929aedb6070336be60162633ed485bd0a2d (patch)
treec0e1a18328f0a9419dc62615d4b83f22480db806 /php-icewind-smb-autoload.php
parenta5d469e2b2e2252816408ceeac07f6d41a7dd6ac (diff)
php-icewind-smb: 1.1.2
Diffstat (limited to 'php-icewind-smb-autoload.php')
-rw-r--r--php-icewind-smb-autoload.php18
1 files changed, 5 insertions, 13 deletions
diff --git a/php-icewind-smb-autoload.php b/php-icewind-smb-autoload.php
index e15e01e..ba88035 100644
--- a/php-icewind-smb-autoload.php
+++ b/php-icewind-smb-autoload.php
@@ -1,18 +1,10 @@
<?php
/* Autoloader for icewind/smb and its dependencies */
-$vendorDir = '/usr/share/php';
-// Use Symfony autoloader
-if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
- if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
- require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php';
- }
+require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
+\Fedora\Autoloader\Autoload::addPsr4('Icewind\\SMB\\', __DIR__);
+\Fedora\Autoloader\Dependencies::required(array(
+ '/usr/share/php/Icewind/Streams/autoload.php',
+));
-$fedoraClassLoader->addPrefix('Icewind\\SMB\\', dirname(dirname(__DIR__)));
-
-// Dependencies
-require_once $vendorDir . '/Icewind/Streams/autoload.php';