Ejemplo n.º 1
0
 public function createRequest(Application $aApp)
 {
     $aReq = new HttpRequest();
     // 访问入口
     Folder::singleton()->find('/')->setHttpUrl(dirname($aReq->urlPath()));
     return $aReq;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 /**
  * @param serialized
  */
 public function unserialize($serialized)
 {
     $this->aKeyFolder = Folder::singleton()->findFolder($serialized, Folder::FIND_AUTO_CREATE);
 }
Ejemplo n.º 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);
 }