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