/** * * @param string $psModule * @param string $psController * @param string $psAction * @param string $psParam */ public function getParamHelp($psModule, $psController, $psAction, $psParam) { $psModule = String::lcfirst($psModule); $psController = String::lcfirst($psController); if (isset($this->_aModuleHelp[$psModule][$psController][$psAction]["params"][$psParam])) { return $this->_aModuleHelp[$psModule][$psController][$psAction]["params"][$psParam]; } return null; }
/** * * @param string $psPath * @param string $psFile * @param string $psFileLicense * @param string $psFileType */ public function saveFile($psPath, $psFile, $psFileLicense = "", $psFileType = "php") { switch ($psFile) { case 'htaccess': $lsFileName = ".{$psFile}"; break; case 'Entity': case 'EntityEmpty': $lsFileName = "{$this->_sModuleName}.php"; break; case 'actionIndex': $lsFileName = "index.phtml"; break; case '_Dashboard': case '_Site': $lsFileName = "{$this->_sModuleName}Controller.php"; break; case 'dashboard.config': case 'site.config': $lsFileName = "module.config.php"; break; default: $lsFileName = "{$psFile}.{$psFileType}"; $lsFileName = preg_replace("/_/", $this->_sModuleName, $lsFileName); } $lsFilePath = $psPath . DS . $lsFileName; if (!file_exists($lsFilePath)) { $lsFileContent = System::localRequest($this->_sModelPath . DS . "{$psFile}.model"); Util::parse($lsFileContent, "#%LICENSE%#", $psFileLicense); Util::parse($lsFileContent, "#%MODULE%#", $this->_sModuleName); Util::parse($lsFileContent, "#%TABLE%#", $this->_sModuleName); Util::parse($lsFileContent, "#%ACTION%#", String::lcfirst($this->_sModuleName)); Util::parse($lsFileContent, "#%ROUTE%#", String::slugfy($this->_sModuleName)); Util::parse($lsFileContent, "#%PACKAGE%#", $this->_sClientFolder); Util::parse($lsFileContent, "#%CLIENT-NAME%#", $this->_sClientName); Util::parse($lsFileContent, "#%DATE%#", date('Y-m-d')); Util::parse($lsFileContent, "#%DOMAIN%#", $this->_sClientDomain); System::saveFile($lsFilePath, $lsFileContent); } }