1 <?php
2 3 4 5 6 7 8 9
10
11
12 13 14 15 16 17 18 19
20 function uix_autoload_class( $class ){
21 $parts = explode( '\\', $class );
22 $name = array_shift( $parts );
23 if( file_exists( UIX_PATH . 'classes/' . $name ) ){
24 if( !empty( $parts ) ){
25 $name .= '/' . implode( '/', $parts );
26 }
27 $class_file = UIX_PATH . 'classes/' . $name . '.php';
28 if( file_exists( $class_file ) ){
29 include_once $class_file;
30 }
31 }
32 }
33
34 35 36 37 38
39 function uix(){
40 $request_data = array(
41 'post' => $_POST,
42 'get' => $_GET,
43 'files' => $_FILES,
44 'request' => $_REQUEST,
45 'server' => $_SERVER,
46 );
47
48 return \uix\ui::get_instance( $request_data );
49 }