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


PHP strToLower函数代码示例

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


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


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