comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:1d038bc9b3d2
1 <?php
2
3 /**
4 * This file is part of Mute\Facebook.
5 *
6 * For the full copyright and license information, please view the LICENSE
7 * file that was distributed with this source code.
8 *
9 * @author Xavier Barbosa <[email protected]>
10 * @copyright Copyright (c) 2012-2014, Xavier Barbosa
11 * @license http://opensource.org/licenses/MIT
12 **/
13
14 spl_autoload_register(function ($classname) {
15 $path = strtr($classname, array('\\' => DIRECTORY_SEPARATOR));
16 $filename = realpath(__DIR__ . '/../src/' . $path . '.php');
17 if ($filename) {
18 include $filename;
19 }
20
21 $filename = realpath(__DIR__ . '/' . $path . '.php');
22 if ($filename) {
23 include $filename;
24 }
25
26 // Fallback with included paths
27 foreach (explode(PATH_SEPARATOR, get_include_path()) as $dir) {
28 $filename = realpath($dir . '/' . $path . '.php');
29 if ($filename) {
30 include $filename;
31 }
32 }
33 });