Guest User

Untitled

a guest
Apr 21st, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. function main_autoload( $class_name )
  2. {
  3.     global $xpl_file_tree ;
  4.     global $tags_tree ;
  5.     //Loading Xpl Library
  6.     $xpl_filename = strtolower ( $class_name ) . '.php' ;
  7.     $xpl_class_node = $xpl_file_tree -> find_node_by_property_from_root ( 'name' , $xpl_filename ) ;
  8.     $xpl_file = $xpl_class_node -> properties[ 'path' ] ;
  9.  
  10.     if ( is_file ( SITE_PATH . $xpl_file ) )
  11.     {
  12.         include SITE_PATH . $xpl_file ;
  13.         return ;
  14.     }
  15. }
Add Comment
Please, Sign In to add comment