1 : <?php
2 :
3 : /**
4 : * Bootstrapper for the MIDI parsing library
5 : *
6 : * @package Midi
7 : * @copyright © 2009 Tommy Montgomery <http://phpmidiparser.com/>
8 : * @since 1.0
9 : */
10 :
11 : namespace Midi;
12 :
13 : /**
14 : * Autoload mechanism for the MIDI parsing library
15 : *
16 : * @since 1.0
17 : *
18 : * @param string $class The fully qualified name of the class
19 : */
20 : function autoload($class) {
21 44 : $file = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, ltrim($class, '\\')) . '.php';
22 :
23 44 : if (is_file($file)) {
24 44 : require_once $file;
25 44 : }
26 44 : }
27 :
28 : spl_autoload_register('\Midi\autoload');
29 :
|