示例#1
0
 /**
  * 构造函数
  * @param mixed $config 应用程序配置。 
  * 如果是一个字符串,它将被当作包含配置的文件路径;
  *  如果是一个数组,它将被当作具体的配置信息, 
  *  你确保在配置文件中指定basePath属性, 
  *  它通常应该指向含所有的应用程序逻辑、模板和数据的目录包。
  */
 function __construct($config = null)
 {
     // 		\Sky\Sky::setApplication($this);
     \Sky\Sky::$app = $this;
     $this->registerErrorHandlers();
     $this->registerCoreComponents();
     $this->setAppConfig($config);
     $this->preloadComponents();
     $this->init();
     \Sky\Sky::beginXProfile();
 }