Exemplo n.º 1
0
 /**
  * Initialize ICE
  *
  * You must tell ICE at what URL its root directory is located
  *
  * @param string $ice_url The absolute URL to ICE root
  */
 public static final function init($ice_url)
 {
     // new instance if necessary
     if (!self::$instance instanceof self) {
         // define api ext prefixes
         define('ICE_EXT_PREFIX', 'ICE_Ext');
         // define ICE urls
         define('ICE_URL', $ice_url);
         define('ICE_ASSETS_URL', ICE_URL . '/assets');
         define('ICE_CSS_URL', ICE_ASSETS_URL . '/css');
         define('ICE_ERRORS_URL', ICE_ASSETS_URL . '/errors');
         define('ICE_IMAGES_URL', ICE_ASSETS_URL . '/images');
         define('ICE_JS_URL', ICE_ASSETS_URL . '/js');
         // is this an AJAX request?
         define('ICE_AJAX_REQUEST', defined('DOING_AJAX'));
         // create singleton instance
         self::$instance = new self();
         // load really important classes
         self::$instance->load('collections', 'utils/files', 'utils/enqueue');
     }
 }