當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CWizardUtil::CheckName方法代碼示例

本文整理匯總了PHP中CWizardUtil::CheckName方法的典型用法代碼示例。如果您正苦於以下問題:PHP CWizardUtil::CheckName方法的具體用法?PHP CWizardUtil::CheckName怎麽用?PHP CWizardUtil::CheckName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CWizardUtil的用法示例。


在下文中一共展示了CWizardUtil::CheckName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: CWizard

 function CWizard($wizardName)
 {
     $this->name = $wizardName;
     if (!CWizardUtil::CheckName($this->name)) {
         $this->SetError(GetMessage("MAIN_WIZARD_ERROR_WRONG_WIZ_NAME"));
         return;
     }
     $pathToWizard = CWizardUtil::MakeWizardPath($this->name);
     $this->path = CWizardUtil::GetRepositoryPath() . $pathToWizard;
     if (!file_exists($_SERVER["DOCUMENT_ROOT"] . $this->path) || !is_dir($_SERVER["DOCUMENT_ROOT"] . $this->path)) {
         $this->SetError(GetMessage("MAIN_WIZARD_ERROR_NOT_FOUND"));
         return;
     }
     $this->__GetDescription();
     $this->__CheckDepends();
     $this->__GetInstallationScript();
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:17,代碼來源:wizard_site.php

示例2: CopyWizard

 function CopyWizard($wizardName, $newName)
 {
     if (!CWizardUtil::CheckName($wizardName) || !CWizardUtil::CheckName($newName)) {
         return false;
     }
     $wizardPath = $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($wizardName);
     $newNamePath = $_SERVER["DOCUMENT_ROOT"] . CWizardUtil::GetRepositoryPath() . CWizardUtil::MakeWizardPath($newName);
     if (!file_exists($wizardPath) || file_exists($newNamePath)) {
         return false;
     }
     CopyDirFiles($wizardPath, $newNamePath, $rewrite = false, $recursive = true);
     return true;
 }
開發者ID:spas-viktor,項目名稱:books,代碼行數:13,代碼來源:wizard_util.php

示例3: GetDemoWizard

 function GetDemoWizard()
 {
     if (!defined("B_PROLOG_INCLUDED")) {
         define("B_PROLOG_INCLUDED", true);
     }
     if (isset($GLOBALS["arWizardConfig"]) && array_key_exists("demoWizardName", $GLOBALS["arWizardConfig"]) && CWizardUtil::CheckName($GLOBALS["arWizardConfig"]["demoWizardName"])) {
         return $GLOBALS["arWizardConfig"]["demoWizardName"];
     }
     $arWizards = CWizardUtil::GetWizardList();
     $defaultWizard = false;
     foreach ($arWizards as $arWizard) {
         $wizardID = $arWizard["ID"];
         if ($wizardID == "bitrix:demo") {
             $defaultWizard = "bitrix:demo";
             continue;
         }
         $position = strpos($wizardID, ":");
         if ($position !== false) {
             $wizardName = substr($wizardID, $position + 1);
         } else {
             $wizardName = $wizardID;
         }
         if ($wizardName == "demo") {
             return $wizardID;
         }
     }
     return $defaultWizard;
 }
開發者ID:ASDAFF,項目名稱:bitrix-5,代碼行數:28,代碼來源:utils.php


注:本文中的CWizardUtil::CheckName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。