4 * This file is part of Psy Shell.
6 * (c) 2012-2017 Justin Hileman
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
15 * Psy class autoloader.
20 * Register autoload() as an SPL autoloader.
24 public static function register()
26 spl_autoload_register(array(__CLASS__, 'autoload'));
30 * Autoload Psy classes.
32 * @param string $class
34 public static function autoload($class)
36 if (0 !== strpos($class, 'Psy')) {
40 $file = dirname(__DIR__) . '/' . strtr($class, '\\', '/') . '.php';