• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP strToLower函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getConfigKeys

 /**
  * Path in urls configuration to key.
  * Override if necessary.
  * @return array of keys
  */
 protected function getConfigKeys()
 {
     $path = explode('\\', strToLower(get_class($this)));
     $path = array_splice($path, 1);
     // remove first (Csfd)
     return $path;
 }
开发者ID:Skokan44,项目名称:csfd-api,代码行数:12,代码来源:UrlAccess.php


示例2: getSolrField

 /**
  * Get the Solr field associated with a particular browse action.
  *
  * @param string $action Browse action
  * @param string $backup Backup browse action if no match is found for $action
  *
  * @return string
  */
 public function getSolrField($action, $backup = null)
 {
     $action = strToLower($action);
     $backup = strToLower($backup);
     switch ($action) {
         case 'dewey':
             return 'dewey-hundreds';
         case 'lcc':
             return 'callnumber-first';
         case 'author':
             return 'authorStr';
         case 'topic':
             return 'topic_facet';
         case 'genre':
             return 'genre_facet';
         case 'region':
             return 'geographic_facet';
         case 'era':
             return 'era_facet';
     }
     if ($backup == null) {
         return $action;
     }
     return $this->getSolrField($backup);
 }
开发者ID:tillk,项目名称:vufind,代码行数:33,代码来源:Browse.php


示例3: __construct

 public function __construct($url, array $args = NULL, $method = self::GET, $cookie = NULL)
 {
     self::$_dbgCount++;
     $headers = ['Content-type: application/x-www-form-urlencoded'];
     if ($cookie) {
         $headers[] = "Cookie: {$cookie}";
     }
     $polo = ['http' => ['method' => $method, 'header' => implode("\r\n", $headers), 'ignore_errors' => TRUE]];
     if ($args) {
         $polo['http']['content'] = http_build_query($args);
     }
     list($this->content, $rawHeaders) = $this->fileGetContents($url, NULL, stream_context_create($polo));
     if ($this->content === FALSE) {
         list($res) = $this->fileGetContents('http://google.com');
         if ($res === FALSE) {
             throw new Exception('Request failed. Your internet connection is down.', Exception::NO_CONNECTION);
         } else {
             throw new Exception('Request failed. You have been blacklisted by CSFD firewall, which usually lasts for about a day.', Exception::BLOCKED);
         }
     }
     $this->statusCode = (int) substr($rawHeaders[0], strlen('HTTP/1.1 '));
     array_shift($rawHeaders);
     $headers = [];
     foreach ($rawHeaders as $header) {
         $p = strpos($header, ':');
         if ($p === FALSE) {
             // ignore status header from redirected request
             continue;
         }
         $key = strToLower(substr($header, 0, $p));
         $value = trim(substr($header, $p + 1));
         $headers[$key][] = $value;
     }
     $this->headers = $headers;
 }
开发者ID:Skokan44,项目名称:csfd-api,代码行数:35,代码来源:Request.php


示例4: __construct

 function __construct($table)
 {
     $class = get_class($this);
     print_r(strToLower($class));
     echo "\n";
     parent::__construct($table);
 }
开发者ID:jonolsson,项目名称:Saturday,代码行数:7,代码来源:Articles.php


示例5: __call

 /**
  *  \brief Metoda mapujaca wywolania metod w formacie load[typKonfiguracji]
  *
  *  Do stwierdzenia czy zazadano wywolania metody ladujacej konfiguracje o
  *  podanym formacie uzyto wyrazen regularnych. 
  *
  *  \param $name Nazwa wywoˆywanej metody
  *  \param $args Tablica z parametrami wywolywanej metody
  */
 public function __call($name, $args)
 {
     if (ereg('load(.*)', $name, $arr)) {
         return $this->load($args[0], strToLower($arr[1]));
     }
     return false;
 }
开发者ID:BackupTheBerlios,项目名称:easydao-svn,代码行数:16,代码来源:xmlConfig.class.php


示例6: cmpLang

function cmpLang($a, $b)
{
    if ($a == $b) {
        return 0;
    }
    return strtolower($a->TranslatedName) < strToLower($b->TranslatedName) ? -1 : 1;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:7,代码来源:_languageselector.helper.php


示例7: onOpen

 function onOpen() {
   $key = $this->getAttribute('key');
   $obj = $this->getDocument()->getVariable($key);
   if(is_object($obj) || is_array($obj)) {
     foreach($obj as $k=>$v) {
       $this->getDocument()->setVariable($k, $v);
     }
     
     if(is_object($obj)){
       // Loop thru each method to detect it's a getter and include its ret value 
       $rClass = new ReflectionClass($obj);
       foreach($rClass->getMethods() as $rMethod){
         ($mn = $rMethod->getName());
         if($rMethod->isPublic() 
          && ('get' === substr($mn,0,3))
          && (0 == count($rMethod->getParameters()))) {
               $var = subStr($mn,3); //extract the variable name
               $var[0] = strToLower($var[0]); //lower first letter case
       	      $this->getDocument()->setVariable($var, $rMethod->invoke($obj) );
             }
       }      
     }
     return self::PROCESS_BODY;
   } 
   return self::SKIP_BODY;
 }
开发者ID:BackupTheBerlios,项目名称:freeform-frmwrk,代码行数:26,代码来源:HTMLShowObject.php5


示例8: autoloadFields

function autoloadFields($class)
{
    if (strToLower(left($class, 5)) !== 'field') {
        return;
    }
    require_once jailpath(DIAMONDMVC_ROOT . '/classes/fields', strToLower(substr($class, 5)) . '.php');
}
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:7,代码来源:fields.php


示例9: namespaceToName

 /**
  * @return string
  * @param string $namespace
  */
 public static function namespaceToName($namespace)
 {
     $result = preg_replace('/' . preg_quote(self::MODULE_SUFFIX) . '$/', '', $namespace);
     $result = preg_replace('/(.)([A-Z])/', '\\1' . self::MODULE_NAME_SEPARATOR . '\\2', $result);
     $result = strToLower($result);
     return $result;
 }
开发者ID:visor,项目名称:nano,代码行数:11,代码来源:Modules.php


示例10: draw_array

function draw_array($array, $nice = false)
{
    global $_josh;
    if (!is_array($array)) {
        return false;
    }
    $return = '<table cellspacing="1" style="background-color:#ccc;color:#333;border:0px;">';
    //if (!$nice) ksort($array);
    foreach ($array as $key => $value) {
        $key = urldecode($key);
        if ($nice && strToLower($key) == 'j') {
            continue;
        }
        //$value = format_quotes($value);
        if (strToLower($key) == 'email') {
            $value = '<a href="mailto:' . $value . '">' . $value . '</a>';
        }
        if (is_array($value)) {
            $value = draw_array($value, $nice);
        }
        $return .= '<tr><td style="background-color:#eee;"><b>';
        $return .= $nice ? format_text_human($key) : $key;
        $return .= '&nbsp;</b></td><td style="background-color:#fff;">';
        $return .= is_object($value) ? 'object value' : $value;
        $return .= '</td></tr>';
    }
    $return .= '</table>';
    return $return;
}
开发者ID:joshreisner,项目名称:hcfa-cc,代码行数:29,代码来源:draw.php


示例11: main

 /**
  * [Describe function...]
  *
  * @return	[type]		...
  */
 function main()
 {
     global $LANG;
     $this->content .= $this->main_parse_html($this->modData['openKeys']);
     // if no HTTP input conversion is configured, the input was uft-8 (urlencoded).
     $fromCharSet = 'utf-8';
     // if conversion was done, the input is encoded in mbstring.internal_encoding
     if (in_array('mbstring', get_loaded_extensions()) && ini_get('mbstring.encoding_translation')) {
         $fromCharSet = strToLower(ini_get('mbstring.internal_encoding'));
     }
     $clientInfo = t3lib_div::clientInfo();
     // the charset of the content element, possibly overidden by forceCharset
     $toCharSet = t3lib_div::_GP('charset') ? t3lib_div::_GP('charset') : 'iso-8859-1';
     // IE wants it back in utf-8
     if ($clientInfo['BROWSER'] = 'msie') {
         $toCharSet = 'utf-8';
     } elseif ($clientInfo['SYSTEM'] = 'win') {
         // if the client is windows the input may contain windows-1252 characters;
         if (strToLower($toCharSet) == 'iso-8859-1') {
             $toCharSet = 'Windows-1252';
         }
     }
     // convert to requested charset
     $this->content = $LANG->csConvObj->conv($this->content, $fromCharSet, $toCharSet);
     header('Content-Type: text/plain; charset=' . $toCharSet);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:class.tx_rtehtmlarea_parse_html.php


示例12: authenticate

 public function authenticate()
 {
     $usersAR = Users::model()->getAllUsers();
     //		var_dump ($usersAR);
     $Users = array();
     foreach ($usersAR as $user) {
         $Users[$user->username] = '';
     }
     /*
     		$Users=array(
     			// username => password
     			'irma'=>'',
     			'robert'=>'',
     			'geli'=>'',
     			'georg'=>'',
     			'theresia'=>'',
     			'josef'=>'',
     			'admin'=>'',
     		);
     */
     if (!isset($Users[strToLower($this->username)])) {
         echo "Username not found: " . strToLower($this->username);
         echo "<br/>Please go back and try again.";
         $this->errorCode = self::ERROR_USERNAME_INVALID;
         //elseif($Users[$this->username]!==$this->password)
         //	$this->errorCode=self::ERROR_PASSWORD_INVALID;
     } else {
         $this->errorCode = self::ERROR_NONE;
         $userID = Yii::app()->db->createCommand()->select('u.userID')->from('Users u')->where('u.username=:username', array(':username' => strToLower($this->name)))->queryRow();
         $this->_id = $userID;
     }
     return !$this->errorCode;
 }
开发者ID:steffolino,项目名称:uniBA_master_videocalls,代码行数:33,代码来源:UserIdentity.php


示例13: runTests

function runTests($path, Container $container)
{
    global $argv;
    $tests = $argv;
    array_shift($tests);
    foreach (file_get_php_classes($path) as $class) {
        if (!is_subclass_of($class, TestCase::class)) {
            continue;
        }
        /** @var TestCase $test */
        $test = new $class($container);
        if (!$tests) {
            $test->run();
        }
        $first = TRUE;
        foreach ($test->getTests() as $method) {
            foreach ($tests as $name) {
                if (strpos(strToLower($method), strToLower($name)) !== FALSE) {
                    if (!$first) {
                        echo "\n";
                    }
                    echo "[01;33m{$method}[0m\n";
                    $test->runTest($method);
                    $first = FALSE;
                }
            }
        }
    }
}
开发者ID:VasekPurchart,项目名称:khanovaskola-v3,代码行数:29,代码来源:bootstrap.php


示例14: cmpForumLang

function cmpForumLang($a, $b)
{
    if ($a == $b) {
        return 0;
    }
    return strtolower($a->Name) < strToLower($b->Name) ? -1 : 1;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:7,代码来源:forums.model.php


示例15: onCommand

 /**
  * @param CommandSender $sender
  * @param Command $command
  * @param string $commandAlias
  * @param array $args
  *
  * @return bool
  */
 public function onCommand(CommandSender $sender, Command $command, $commandAlias, array $args)
 {
     if (strToLower($command) === $this->plugin->getDatabase()->get("command-name")) {
         // TODO: 명령어만 친 경우
         if (!isset($args[0])) {
             $sender->sendMessage($this->plugin->getDatabase()->get("help-message"));
             return true;
         }
         switch (strToLower($args[0])) {
             //TODO: '/예제 어쩌구'
             case $this->plugin->getDatabase()->get("hello-world"):
                 $sender->sendMessage($this->plugin->getDatabase()->get("hello-world-result"));
                 break;
                 // TODO: '/예제 저쩌구'
             // TODO: '/예제 저쩌구'
             case $this->plugin->getDatabase()->get("dlrow-olleh"):
                 $sender->sendMessage($this->plugin->getDatabase()->get("dlrow-olleh-result"));
                 break;
                 // TODO: 잘못된 명령어를 입력한 경우
             // TODO: 잘못된 명령어를 입력한 경우
             default:
                 $sender->sendMessage($this->plugin->getDatabase()->get("wrong-command"));
                 break;
         }
     }
     return true;
 }
开发者ID:ChalkPE,项目名称:ExamplePlugin,代码行数:35,代码来源:EventListener.php


示例16: lintClassCase

 /**
  * Tests that all classes are cased properly.  
  *       
  * This helps avoid __autoload problems when working 
  * locally on a case insensatie system
  */
 public function lintClassCase($config)
 {
     $nodes = $config->xPath('//class');
     $errors = array();
     foreach ($nodes as $node) {
         $str_node = (string) $node;
         if (strpos($str_node, '/') !== false) {
             if ($str_node != strToLower($str_node)) {
                 $errors[] = 'URI [' . $str_node . '] must be all lowercase;';
             }
         } else {
             if (strpos($str_node, '_') !== false) {
                 $parts = preg_split('{_}', $str_node, 4);
                 foreach ($parts as $part) {
                     if (ucwords($part) != $part) {
                         $errors[] = "Class [{$str_node}] does not have proper casing. Each_Word_Must_Be_Leading_Cased.";
                     }
                 }
             } else {
                 $errors[] = 'Class [' . $str_node . '] doesn\'t loook like a class';
             }
         }
     }
     if (count($errors) > 0) {
         $this->fail(implode("\n", $errors));
     }
 }
开发者ID:astorm,项目名称:Configlint,代码行数:33,代码来源:Xmlstructure.php


示例17: pestle_cli

/**
* Generates bin/magento command files
* This command generates the necessary files and configuration 
* for a new command for Magento 2's bin/magento command line program.
*
*   pestle.phar Pulsestorm_Generate Example
* 
* Creates
* app/code/Pulsestorm/Generate/Command/Example.php
* app/code/Pulsestorm/Generate/etc/di.xml
*
* @command generate_command
* @argument module_name In which module? [Pulsestorm_Helloworld]
* @argument command_name Command Name? [Testbed]
*/
function pestle_cli($argv)
{
    $module_info = getModuleInformation($argv['module_name']);
    $namespace = $module_info->vendor;
    $module_name = $module_info->name;
    $module_shortname = $module_info->short_name;
    $module_dir = $module_info->folder;
    $command_name = $argv['command_name'];
    // $command_name       = input("Command Name?", 'Testbed');
    output($module_dir);
    createPhpClass($module_dir, $namespace, $module_shortname, $command_name);
    $path_di_xml = createDiIfNeeded($module_dir);
    $xml_di = simplexml_load_file($path_di_xml);
    //get commandlist node
    $nodes = $xml_di->xpath('/config/type[@name="Magento\\Framework\\Console\\CommandList"]');
    $xml_type_commandlist = array_shift($nodes);
    if (!$xml_type_commandlist) {
        throw new Exception("Could not find CommandList node");
    }
    $argument = simpleXmlAddNodesXpath($xml_type_commandlist, '/arguments/argument[@name=commands,@xsi:type=array]');
    $full_class = $namespace . '\\' . $module_shortname . '\\Command\\' . $command_name;
    $item_name = str_replace('\\', '_', strToLower($full_class));
    $item = $argument->addChild('item', $full_class);
    $item->addAttribute('name', $item_name);
    $item->addAttribute('xsi:type', 'object', 'http://www.w3.org/2001/XMLSchema-instance');
    $xml_di = formatXmlString($xml_di->asXml());
    writeStringToFile($path_di_xml, $xml_di);
}
开发者ID:astorm,项目名称:pestle,代码行数:43,代码来源:module.php


示例18: autoloadEvents

function autoloadEvents($class)
{
    if (strToLower(right($class, 5)) !== 'event') {
        return;
    }
    require_once jailpath(DIAMONDMVC_ROOT . '/classes/events', strToLower(substr($class, 0, strlen($class) - 5)) . '.php');
}
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:7,代码来源:events.php


示例19: mainAutoLoader

function mainAutoLoader($class)
{
    // Exceptions werden leicht besonders behandelt.
    if (right($class, 9) === 'Exception') {
        $file = DIAMONDMVC_ROOT . "/exceptions/{$class}.php";
    } else {
        $class = strToLower($class);
        if (left($class, 10) === 'controller' and $class !== 'controller') {
            $class = substr($class, 10);
            $file = DIAMONDMVC_ROOT . "/controllers/{$class}.php";
        } else {
            if (left($class, 5) === 'model' and $class !== 'model') {
                $class = substr($class, 5);
                $file = DIAMONDMVC_ROOT . "/models/{$class}.php";
            } else {
                if (left($class, 6) === 'module' and $class !== 'module') {
                    $class = substr($class, 6);
                    $file = DIAMONDMVC_ROOT . "/modules/{$class}/{$class}.php";
                } else {
                    $file = DIAMONDMVC_ROOT . "/lib/class_{$class}.php";
                }
            }
        }
    }
    if (file_exists($file)) {
        include_once $file;
    }
}
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:28,代码来源:autoload.php


示例20: createPathFromNamespace

function createPathFromNamespace($namespace)
{
    $parts = explode('\\', $namespace);
    $path_dir = strToLower('modules/' . implode('/', $parts));
    $path_full = $path_dir . '/module.php';
    return $path_full;
}
开发者ID:benmarks,项目名称:pestle,代码行数:7,代码来源:module.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP strToTime函数代码示例发布时间:2022-05-23
下一篇:
PHP strToHex函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap