示例#1
0
 public function createRequest(Application $aApp)
 {
     $aReq = new HttpRequest();
     // 访问入口
     Folder::singleton()->find('/')->setHttpUrl(dirname($aReq->urlPath()));
     return $aReq;
 }
示例#2
0
 /**
  * @return org\jecat\framework\lang\oop\Package
  */
 public function compiledPackage()
 {
     if (!$this->aCompiledPackage) {
         $sFolderPath = $this->sCompiledFolderPath . '/' . $this->strategySignature();
         $aFolder = Folder::singleton()->findFolder($sFolderPath, Folder::FIND_AUTO_CREATE);
         $this->aCompiledPackage = new Package('', $aFolder);
     }
     return $this->aCompiledPackage;
 }
示例#3
0
文件: FsKey.php 项目: JeCat/framework
 /**
  * @param serialized
  */
 public function unserialize($serialized)
 {
     $this->aKeyFolder = Folder::singleton()->findFolder($serialized, Folder::FIND_AUTO_CREATE);
 }
示例#4
0
 /**
  * @return use org\jecat\framework\setting\Setting;
  */
 public function createSetting()
 {
     if (!($aSettingFolder = Folder::singleton()->findFolder("/settings", Folder::FIND_AUTO_CREATE))) {
         throw new Exception("无法在目录 /setting 中建立系统配置");
     }
     return new FsSetting($aSettingFolder);
 }