diff default/assets/vendors/theme-widgets/vendor/mute/facebook/tests/bootstrap.php @ 0:1d038bc9b3d2 default tip

Up:default
author Liny <dev@neowd.com>
date Sat, 31 May 2025 09:21:51 +0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/default/assets/vendors/theme-widgets/vendor/mute/facebook/tests/bootstrap.php	Sat May 31 09:21:51 2025 +0800
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * This file is part of Mute\Facebook.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ *
+ * @author Xavier Barbosa <[email protected]>
+ * @copyright Copyright (c) 2012-2014, Xavier Barbosa
+ * @license http://opensource.org/licenses/MIT
+ **/
+
+spl_autoload_register(function ($classname) {
+    $path = strtr($classname, array('\\' => DIRECTORY_SEPARATOR));
+    $filename = realpath(__DIR__ . '/../src/' . $path . '.php');
+    if ($filename) {
+        include $filename;
+    }
+
+    $filename = realpath(__DIR__ . '/' . $path . '.php');
+    if ($filename) {
+        include $filename;
+    }
+
+    // Fallback with included paths
+    foreach (explode(PATH_SEPARATOR, get_include_path()) as $dir) {
+        $filename = realpath($dir . '/' . $path . '.php');
+        if ($filename) {
+            include $filename;
+        }
+    }
+});