本文整理汇总了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);
}