summaryrefslogtreecommitdiffstats
path: root/php-icewind-smb-autoload.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-09-02 08:49:18 +0200
committerRemi Collet <fedora@famillecollet.com>2015-09-02 08:49:18 +0200
commit52fc43beaf02cc56a62d80f93627e8ec8eff10ea (patch)
tree5b8f52de5cd95df3665d7cc2de35a0beafe2f8be /php-icewind-smb-autoload.php
php-icewind-smb: 1.0.4 - New package
Diffstat (limited to 'php-icewind-smb-autoload.php')
-rw-r--r--php-icewind-smb-autoload.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/php-icewind-smb-autoload.php b/php-icewind-smb-autoload.php
new file mode 100644
index 0000000..e15e01e
--- /dev/null
+++ b/php-icewind-smb-autoload.php
@@ -0,0 +1,18 @@
+<?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';
+ }
+
+ $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
+ $fedoraClassLoader->register();
+}
+
+$fedoraClassLoader->addPrefix('Icewind\\SMB\\', dirname(dirname(__DIR__)));
+
+// Dependencies
+require_once $vendorDir . '/Icewind/Streams/autoload.php';