当前位置: 首页>>代码示例>>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;未经允许,请勿转载。