本文整理匯總了PHP中Nette\String::lower方法的典型用法代碼示例。如果您正苦於以下問題:PHP String::lower方法的具體用法?PHP String::lower怎麽用?PHP String::lower使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Nette\String
的用法示例。
在下文中一共展示了String::lower方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isIrregular
/**
* Is given string irregular noun?
*
* @param string $word
* @return bool
*/
public static function isIrregular($word)
{
$lower = String::lower($word);
return (bool) in_array($lower, self::$irregular) || array_key_exists($lower, self::$irregular);
}
示例2: getLowercased
public function getLowercased($storage, $name)
{
$rawData = $storage->getStorage();
return String::lower($rawData[$name]);
}
示例3: parseTypeHints
private function parseTypeHints() {
$line = $this->currentToken[2];
// remove function name and reference, we don't need it
$token = $this->getNextToken();
while($this->isAllowed($token, array("&", T_STRING, T_WHITESPACE))) {
$token = $this->getNextToken();
}
while (!$this->isAllowed($token, ")")) {
$name = String::lower($this->parseName());
if(strlen($name) && !String::startsWith($name, '$') && FALSE === array_search($name, $this->reserved)) {
$this->fileInfo[$this->currentFile][$this->namespace][self::NS_USED_CLASS][$name] = $line;
}
while(!$this->isAllowed($token, array(",",")"))) {
$token = $this->getNextToken();
}
if(!$this->isAllowed($token, ")")) {
$token = $this->getNextToken();
if($this->isAllowed($token, array(T_NS_SEPARATOR, T_STRING))) {
$this->returnToken($token);
}
}
}
}
示例4: getImageTag
public static function getImageTag($mail, $size = 32)
{
$hash = md5(\Nette\String::lower($mail));
$src = "http://www.gravatar.com/avatar/{$hash}?d=mm&s={$size}";
return Html::el('img')->src($src)->alt('')->width($size)->height($size);
}