示例#1
0
文件: warp.php 项目: smart-one/3kita
 function &getInstance()
 {
     static $instance;
     if (!isset($instance)) {
         $instance = new Warp();
         $path = dirname(__FILE__);
         // add default helper
         $instance->addHelper(new WarpHelperPath());
         // set default paths
         $instance->path->register($path, 'warp');
         $instance->path->register($path . '/helpers', 'helpers');
         $instance->path->register($path . '/libraries', 'lib');
         $instance->path->register($path . '/css', 'css');
         $instance->path->register($path . '/js', 'js');
         $instance->path->register($path . '/layouts', 'layouts');
         $instance->path->register($path . '/menus', 'menu');
         $instance->path->register(dirname($path), 'template');
         $instance->loadHelper(array('legacy', 'template', 'menu'));
     }
     return $instance;
 }