Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 78 lines (71 sloc) 3.484 kB
8fa6171 git-svn-id: http://mongodb-morph.googlecode.com/svn/trunk@69 406649b4…
XirisR authored
1 <?php
828ed97 updating file level docs
XirisR authored
2 /**
3 * @author Jonathan Moss <xirisr@gmail.com>
4 * @copyright Jonathan Moss 2010
5 */
8fa6171 git-svn-id: http://mongodb-morph.googlecode.com/svn/trunk@69 406649b4…
XirisR authored
6 Phar::mapPhar();
7
8 /**
9 * Autoloader for the morph package
10 *
11 */
12 class MorphAutoloader
13 {
14
15 /**
16 * A static array of classes
17 *
18 * @var array
19 */
20 private static $classes = array(
380d4cf converted the whole project to namespaced PHP
Jonathan Moss authored
21 'morph\\Collection' => 'phar://Morph/Collection.php',
22 'morph\\Enum' => 'phar://Morph/Enum.php',
23 'morph\\Utils' => 'phar://Morph/Utils.php',
24 'morph\\Iterator' => 'phar://Morph/Iterator.php',
25 'morph\\compare\\NumericProperty' => 'phar://Morph/compare/NumericProperty.php',
26 'morph\\compare\\Property' => 'phar://Morph/compare/Property.php',
27 'morph\\PropertySet' => 'phar://Morph/PropertySet.php',
28 'morph\\Query' => 'phar://Morph/Query.php',
29 'morph\\IQuery' => 'phar://Morph/IQuery.php',
30 'morph\\Object' => 'phar://Morph/Object.php',
31 'morph\\ICompare' => 'phar://Morph/ICompare.php',
32 'morph\\Storage' => 'phar://Morph/Storage.php',
33 'morph\\property\\HasMany' => 'phar://Morph/property/HasMany.php',
34 'morph\\property\\Date' => 'phar://Morph/property/Date.php',
35 'morph\\property\\ComposeMany' => 'phar://Morph/property/ComposeMany.php',
36 'morph\\property\\HasOne' => 'phar://Morph/property/HasOne.php',
37 'morph\\property\\Enum' => 'phar://Morph/property/Enum.php',
38 'morph\\property\\Integer' => 'phar://Morph/property/Integer.php',
39 'morph\\property\\File' => 'phar://Morph/property/File.php',
40 'morph\\property\\Float' => 'phar://Morph/property/Float.php',
41 'morph\\property\\ComposeOne' => 'phar://Morph/property/ComposeOne.php',
42 'morph\\property\\String' => 'phar://Morph/property/String.php',
43 'morph\\property\\Generic' => 'phar://Morph/property/Generic.php',
282ce03 @mgrandi fixed me using tabs instead of spaces in bootstrap.php
mgrandi authored
44 'morph\\property\\Boolean' => 'phar://Morph/property/Boolean.php',
45 'morph\\property\\BinaryData' => 'phar://Morph/property/BinaryData.php',
46 'morph\\property\\Integer32' => 'phar://Morph/property/Integer32.php',
47 'morph\\property\\Integer64' => 'phar://Morph/property/Integer64.php',
48 'morph\\property\\Regex' => 'phar://Morph/property/Regex.php',
baeaf9d object state is now at the property level. This allows for the correc…
Jonthan Moss authored
49 'morph\\property\\Complex' => 'phar://Morph/property/Complex.php',
50 'morph\\property\\StatefulCollection'=> 'phar://Morph/property/StatefulCollection.php',
380d4cf converted the whole project to namespaced PHP
Jonathan Moss authored
51 'morph\\query\\Property' => 'phar://Morph/query/Property.php',
52 'morph\\format\\Collection' => 'phar://Morph/format/Collection.php',
53 'morph\\exception\\ObjectNotFound' => 'phar://Morph/exception/ObjectNotFound.php',
8fa6171 git-svn-id: http://mongodb-morph.googlecode.com/svn/trunk@69 406649b4…
XirisR authored
54 );
55
56 /**
10578e1 testing
moose@a-musing-moose.com authored
57 * class loader
8fa6171 git-svn-id: http://mongodb-morph.googlecode.com/svn/trunk@69 406649b4…
XirisR authored
58 *
59 * @param string $className
60 * @return boolean
61 */
62 public static function load($className)
63 {
64 $isLoaded = false;
65 if (isset(self::$classes[$className])) {
66 include self::$classes[$className];
67 $isLoaded = true;
68 }
69 return $isLoaded;
70 }
71
72 }
73
74 //register the autoloader
75 spl_autoload_register(array('MorphAutoloader', 'load'));
76
146e665 @mgrandi fixed bootstrap.php to map the classes Boolean, Regex, BinaryData, In…
mgrandi authored
77 __HALT_COMPILER();
Something went wrong with that request. Please try again.