ManiaLib 1.0b1 API Reference

Source for file manialib.inc.php

Documentation is available at manialib.inc.php

  1. <?php
  2. /**
  3.  * Framework entry point
  4.  * 
  5.  * @author Maxime Raoust
  6.  * @copyright 2009-2010 NADEO
  7.  * @package ManiaLib
  8.  */
  9.  
  10. /**
  11.  * ManiaLib version
  12.  * @ignore
  13.  */
  14. define('MANIALIB_VERSION''1.0b1');
  15.  
  16. /** 
  17.  * Autoload helper
  18.  * @package ManiaLib
  19.  * @ignore
  20.  */ 
  21. abstract class AutoloadHelper
  22. {
  23.     static $paths array();
  24. }
  25.  
  26. /**
  27.  * Class autoloader
  28.  * @param string Class to load
  29.  * @ignore
  30.  */
  31. function __autoload($className)
  32. {
  33.     foreach(AutoloadHelper::$paths as $path)
  34.     {
  35.         if(file_exists($path $path.$className.'.class.php'))
  36.         {
  37.             require_once($path);
  38.             return true;
  39.         }
  40.     }
  41.     return false;
  42. }
  43.  
  44. /**#@+
  45.  * @ignore
  46.  */
  47. require_oncedirname(__FILE__).'/config.default.php' );
  48. require_oncedirname(__FILE__).'/settings.php' );
  49.  
  50. AutoloadHelper::$paths[APP_LIBRARIES_PATH;
  51. AutoloadHelper::$paths[APP_FRAMEWORK_LIBRARIES_PATH;
  52. AutoloadHelper::$paths[APP_FRAMEWORK_GUI_TOOLKIT_PATH.'cards/';
  53. AutoloadHelper::$paths[APP_FRAMEWORK_GUI_TOOLKIT_PATH.'layouts/';
  54.  
  55. require_onceAPP_FRAMEWORK_LIBRARIES_PATH.'ErrorHandling.class.php' );
  56. require_onceAPP_FRAMEWORK_LIBRARIES_PATH.'RequestEngine.class.php' );
  57. require_onceAPP_FRAMEWORK_LIBRARIES_PATH.'SessionEngine.class.php' );
  58. require_onceAPP_FRAMEWORK_LIBRARIES_PATH.'LangEngine.class.php' );
  59. require_onceAPP_FRAMEWORK_GUI_TOOLKIT_PATH.'Manialink.class.php' );
  60. require_onceAPP_FRAMEWORK_GUI_TOOLKIT_PATH.'Maniacode.class.php' );
  61. /**#@-*/
  62.  
  63. ?>