forked from JorgenEvens/WebLab_Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFramework.php
More file actions
executable file
·32 lines (29 loc) · 792 Bytes
/
Framework.php
File metadata and controls
executable file
·32 lines (29 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
*
* Framework Initialization
*
* Initialisation of the WebLab Framework.
*
* @author Jorgen Evens <jorgen@wlab.be>
* @version 0.1
*
*/
/**
* Autoloader, loads the classes for u.
* This is the default, if you wish to override this behaviour you should register an AddIn.
*
* @param string $className The class to load
*/
function __autoload( $className )
{
// TODO: place this code in a loader class.
// TODO: Create a loader manager.
$c = strtr( $className, '_', '/' ) . '.php';
$cHandle = @fopen( $c, 'r', true );
if( !empty( $cHandle ) ){
fclose( $cHandle );
return include_once( $c );
}
return false;
}