当前位置: 首页>>代码示例>>PHP>>正文


PHP ToLower函数代码示例

本文整理汇总了PHP中ToLower函数的典型用法代码示例。如果您正苦于以下问题:PHP ToLower函数的具体用法?PHP ToLower怎么用?PHP ToLower使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ToLower函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetCategorySequence

 public function GetCategorySequence($CODE)
 {
     if (self::$CategoryIB <= 0 || !$CODE) {
         return array();
     }
     $arCategoryListXML = $this->GetCategoryList();
     $arCategoryList = array();
     foreach ($arCategoryListXML as $arCategory) {
         $arCategoryList[$arCategory["ID"]] = $arCategory;
     }
     $arSequnce = array("CATEGORY_1" => false, "CATEGORY_2" => false);
     $CODE = ToUpper($CODE);
     $arFullSequence = array();
     while (array_key_exists($CODE, $arCategoryListXML)) {
         array_unshift($arFullSequence, ToLower($CODE));
         if ($arCategoryListXML[$CODE]["IBLOCK_SECTION_ID"] > 0 && $arCategoryList[$arCategoryListXML[$CODE]["IBLOCK_SECTION_ID"]]) {
             $CODE = ToUpper($arCategoryList[$arCategoryListXML[$CODE]["IBLOCK_SECTION_ID"]]["CODE"]);
         } else {
             break;
         }
     }
     if (array_key_exists(0, $arFullSequence)) {
         $arSequnce["CATEGORY_1"] = $arFullSequence[0];
     }
     if (count($arFullSequence) > 1) {
         $arSequnce["CATEGORY_2"] = end($arFullSequence);
     }
     $arSequnce["FULL"] = $arFullSequence;
     return $arSequnce;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:30,代码来源:idea_idea.php

示例2: CSearchStatistic

 function CSearchStatistic($phrase = "", $tags = "")
 {
     $phrase = ToLower(trim($phrase, " \t\n\r"));
     if ($l = strlen($phrase)) {
         if ($l > 250) {
             $p = strrpos($phrase, ' ');
             if ($p === false) {
                 $this->_phrase = substr($phrase, 0, 250);
             } else {
                 $this->_phrase = substr($phrase, 0, $p);
             }
         } else {
             $this->_phrase = $phrase;
         }
     } else {
         $this->_phrase = false;
     }
     $arTags = tags_prepare($tags);
     if (count($arTags)) {
         asort($arTags);
         $this->_tags = implode(", ", $arTags);
     } else {
         $this->_tags = false;
     }
     $this->_session_id = bitrix_sessid();
     if (isset($_SESSION["SESS_SESSION_ID"])) {
         $this->_stat_sess_id = intval($_SESSION["SESS_SESSION_ID"]);
     }
 }
开发者ID:spas-viktor,项目名称:books,代码行数:29,代码来源:statistic.php

示例3: GetStatusInfo

 function GetStatusInfo($string)
 {
     switch (ToLower(trim($string))) {
         case "прибыл":
         case "позднее прибытие":
         case "приземлился":
             $result["CODE"] = "L";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_L");
             break;
         case "задержан":
             $result["CODE"] = "D";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_D");
             break;
         case "":
             $result["CODE"] = "P";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_P");
             break;
         case "отправлен":
             $result["CODE"] = "F";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_F");
             break;
         case "отменен":
             $result["CODE"] = "C";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_C");
             break;
         default:
             $result["CODE"] = "";
             $result["NAME"] = htmlspecialchars($string);
     }
     $result["~NAME"] = htmlspecialchars($string);
     return $result;
 }
开发者ID:slavaskazochnik,项目名称:vnukovo-transagency,代码行数:32,代码来源:dme.php

示例4: CleanURL

	public static function CleanURL($URL)
	{
		if (false !== ($pos = strpos($URL, '?')))
		{
			$query = substr($URL, $pos+1);
			$URL = substr($URL, 0, $pos);

			$arQuery = explode('&', $query);

			$arExcludedParams = array('clear_cache', 'clear_cache_session', 'back_url_admin', 'back_url', 'backurl', 'login', 'logout', 'compress');
			foreach ($arQuery as $key => $param)
			{
				if (false !== ($pos = strpos($param, '=')))
				{
					$param_name = ToLower(substr($param, 0, $pos));
					if (
						substr($param_name, 0, 7) == 'freetrix_'
						|| substr($param_name, 0, 5) == 'show_'
						|| in_array($param_name, $arExcludedParams)
					)
					{
						unset($arQuery[$key]);
					}
				}
			}

			if (count($arQuery) > 0)
			{
				$URL .= '?'.implode('&', $arQuery);
			}
		}

		return $URL;
	}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:34,代码来源:seo_utils.php

示例5: GetStatusInfo

 function GetStatusInfo($string)
 {
     switch (ToLower(trim($string))) {
         case "прибыл":
             $result["CODE"] = "L";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_L");
             break;
         case "задержан":
         case "задерживается":
             $result["CODE"] = "D";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_D");
             break;
         case "":
             $result["CODE"] = "P";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_P");
             break;
         case "вылетел":
             $result["CODE"] = "F";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_F");
             break;
         case "отменен":
             $result["CODE"] = "C";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_C");
             break;
         case "регистрация":
             $result["CODE"] = "R";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_R");
             break;
         default:
             $result["CODE"] = "";
             $result["NAME"] = htmlspecialchars($string);
     }
     $result["~NAME"] = htmlspecialchars($string);
     return $result;
 }
开发者ID:slavaskazochnik,项目名称:vnukovo-transagency,代码行数:35,代码来源:fv.php

示例6: getTypes

 public static function getTypes($params = array('LANGUAGE_ID' => LANGUAGE_ID))
 {
     if (!is_array($params)) {
         $params = array();
     }
     if (!isset($params['LANGUAGE_ID'])) {
         $params['LANGUAGE_ID'] = LANGUAGE_ID;
     }
     $result = array();
     $lang = ToLower($params['LANGUAGE_ID']);
     $langMapped = static::mapLanguage($lang);
     $res = \Bitrix\Sale\Location\TypeTable::getList(array('select' => array('*', 'TNAME' => 'NAME.NAME', 'TLANGUAGE_ID' => 'NAME.LANGUAGE_ID'), 'order' => array('SORT' => 'asc', 'NAME.NAME' => 'asc')));
     while ($item = $res->fetch()) {
         if (!isset($result[$item['CODE']])) {
             $result[$item['CODE']] = array('CODE' => $item['CODE'], 'ID' => $item['ID'], 'NAME' => array());
         }
         $result[$item['CODE']]['NAME'][$item['TLANGUAGE_ID']] = $item['TNAME'];
     }
     foreach ($result as $code => &$data) {
         if ((string) $data['NAME'][$lang] != '') {
             $name = $data['NAME'][$lang];
         } else {
             if ((string) $data['NAME'][$langMapped] != '') {
                 $name = $data['NAME'][$langMapped];
             } else {
                 $name = $data['NAME']['en'];
             }
         }
         $data['NAME_CURRENT'] = $name;
     }
     return $result;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:32,代码来源:typehelper.php

示例7: GetStatusInfo

 function GetStatusInfo($string)
 {
     switch (ToLower(trim($string))) {
         case "прилетел":
             $result["CODE"] = "L";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_L");
             break;
         case "не вылетел":
             $result["CODE"] = "D";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_D");
             break;
         case "-":
             $result["CODE"] = "P";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_P");
             break;
         case "вылетел":
             $result["CODE"] = "F";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_F");
             break;
         case "отменен":
             $result["CODE"] = "C";
             $result["NAME"] = GetMessage("AIRPORT_BOARD_STATUS_C");
             break;
         default:
             $result["CODE"] = "";
             $result["NAME"] = "";
     }
     $result["~NAME"] = htmlspecialchars($string);
     return $result;
 }
开发者ID:slavaskazochnik,项目名称:vnukovo-transagency,代码行数:30,代码来源:vko.php

示例8: CapitalizeFirst

 /**
  * Делает первую букву каждого слова заглавной.
  * @param  string $string
  * @return string
  */
 public static function CapitalizeFirst($string)
 {
     $string = explode(' ', $string);
     foreach ($string as &$s) {
         $s = ToUpper(substr($s, 0, 1)) . ToLower(substr($s, 1));
     }
     return implode(' ', $string);
 }
开发者ID:RosYama,项目名称:rosyama.ru,代码行数:13,代码来源:utils.php

示例9: UnInstallDB

 function UnInstallDB($arParams = array())
 {
     global $DB, $DBType, $APPLICATION;
     $this->errors = false;
     if (!array_key_exists("savedata", $arParams) || $arParams["savedata"] != "Y") {
         $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/report/install/db/" . ToLower($DB->type) . "/uninstall.sql");
     }
     UnRegisterModule("report");
     return true;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:10,代码来源:index.php

示例10: CheckReg

function CheckReg()
{
    global $RegLogin, $RegPass, $RegPass2, $RegName, $RegEmail;
    global $Errors, $Lang, $CLang;
    $RegLogin = ToLower($RegLogin);
    if (CheckSymb_($RegLogin)) {
        $Errors[] = $Lang['SymbErr'];
        return;
    }
    if (CheckSymb_($RegPass)) {
        $Errors[] = $Lang['SymbErr'];
        return;
    }
    if (!$RegLogin) {
        $Errors[] = $Lang['MustFillLogin'];
        return;
    }
    if (!$RegPass) {
        $Errors[] = $Lang['MustFillPass'];
        return;
    }
    if (!$RegName) {
        $Errors[] = $Lang['MustFillName'];
        return;
    }
    if (!$RegEmail) {
        $Errors[] = $Lang['MustFillEmail'];
        return;
    }
    if ($RegPass != $RegPass2) {
        $Errors[] = $Lang['PassNotPass2'];
        return;
    }
    if (strlen($RegLogin) < 3) {
        $Errors[] = $Lang['LoginTooShort'];
        return;
    }
    if (strlen($RegLogin) > 64) {
        $Errors[] = $Lang['LoginTooLong'];
        return;
    }
    if (strlen($RegPass) < 3) {
        $Errors[] = $Lang['PassTooShort'];
        return;
    }
    if (strlen($RegPass) > 64) {
        $Errors[] = $Lang['PassTooLong'];
        return;
    }
    if (!ValidMail($RegEmail)) {
        $Errors[] = $Lang['MustFillCorrEmail'];
        return;
    }
    NextStep();
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:55,代码来源:func.php

示例11: decode

 public function decode($data)
 {
     $res = json_decode($data, true);
     self::checkException();
     // PHP<5.3.3 returns no error for JSON_ERROR_UTF8 and some other ones
     if ($res === null && ToLower($data) != 'null') {
         self::throwException(self::JSON_ERROR_UNKNOWN);
     }
     if (!Application::getInstance()->isUtfMode()) {
         $res = self::unConvertData($res);
     }
     return $res;
 }
开发者ID:spas-viktor,项目名称:books,代码行数:13,代码来源:json.php

示例12: cleanUp

 public static function cleanUp()
 {
     $dbConnection = Main\HttpApplication::getConnection();
     try {
         $dbConnection->query('drop table ' . static::getTableName());
         $allowedTypes = array('REGION', 'SUBREGION', 'CITY', 'VILLAGE', 'STREET');
         foreach ($allowedTypes as $type) {
             //$dbConnection->query('drop table b_sale_loc_wc_'.ToLower($type)); // here replace according to map: TYPE_CODE => TABLE_ID
             $dbConnection->query('truncate table b_sale_loc_wc_' . ToLower($type));
         }
     } catch (\Bitrix\Main\DB\SqlQueryException $e) {
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:13,代码来源:wordchain.php

示例13: UnInstallDB

	public function UnInstallDB($arParams = array())
	{
		global $DB, $DBType, $APPLICATION;

		$errors = false;
		if(!array_key_exists("savedata", $arParams) || $arParams["savedata"] != "Y")
			$errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".self::MODULE_ID."/install/db/".ToLower($DB->type)."/uninstall.sql");
		if($errors !== false)
			throw new \Exception(implode("<br>", $errors));

		UnRegisterModule(self::MODULE_ID);

		return true;
	}
开发者ID:alexshipil,项目名称:bitrix.simple.module,代码行数:14,代码来源:index.php

示例14: _cnVerifyFileField

 function _cnVerifyFileField($value, $arConf)
 {
     if (!empty($arConf['MAX_FILE_SIZE']) && $value['size'] > $arConf['MAX_FILE_SIZE']) {
         return 'FILE_SIZE';
     }
     if (!empty($arConf['ALLOWED_FILE_TYPES'])) {
         $ext = ToLower(end(explode('.', $value['name'])));
         $arValidExt = explode(',', ToLower($arConf['ALLOWED_FILE_TYPES']));
         if (!in_array($ext, $arValidExt)) {
             return 'FILE_TYPE';
         }
     }
     return true;
 }
开发者ID:info-expert-projects,项目名称:BitrixCustomForm,代码行数:14,代码来源:component.php

示例15: cleanUpData

 public static function cleanUpData()
 {
     $dbConnection = Main\HttpApplication::getConnection();
     Helper::dropTable(static::getTableName());
     $binary = ToLower($dbConnection->getType()) == 'mysql' ? 'binary' : '';
     // http://bugs.mysql.com/bug.php?id=34096
     // ORACE: OK, MSSQL: OK
     Main\HttpApplication::getConnection()->query("create table " . static::getTableName() . " (\n\n\t\t\tID " . Helper::getSqlForDataType('int') . " not null " . Helper::getSqlForAutoIncrement() . " primary key,\n\t\t\tWORD " . Helper::getSqlForDataType('varchar', 50) . " " . $binary . " not null,\n\t\t\tPOSITION " . Helper::getSqlForDataType('int') . " default '0'\n\t\t)");
     Helper::addAutoIncrement(static::getTableName());
     // only for ORACLE
     Helper::createIndex(static::getTableName(), 'TMP', array('WORD'), true);
     Helper::dropTable(static::getTableNameWord2Location());
     // ORACLE: OK, MSSQL: OK
     Main\HttpApplication::getConnection()->query("create table " . static::getTableNameWord2Location() . " (\n\n\t\t\tLOCATION_ID " . Helper::getSqlForDataType('int') . " not null,\n\t\t\tWORD_ID " . Helper::getSqlForDataType('int') . " not null,\n\n\t\t\tprimary key (LOCATION_ID, WORD_ID)\n\t\t)");
     Helper::dropTable(static::getTableNamePositionTemporal());
     $dbConnection->query("create table " . static::getTableNamePositionTemporal() . " (\n\t\t\tWORD_ID " . Helper::getSqlForDataType('int') . " not null,\n\t\t\tPOSITION " . Helper::getSqlForDataType('int') . " default '0'\n\t\t)");
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:17,代码来源:word.php


注:本文中的ToLower函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。