/** * 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); }
public function getLowercased($storage, $name) { $rawData = $storage->getStorage(); return String::lower($rawData[$name]); }
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); } } } }
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); }