本文整理汇总了PHP中ucWords函数的典型用法代码示例。如果您正苦于以下问题:PHP ucWords函数的具体用法?PHP ucWords怎么用?PHP ucWords使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ucWords函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Standard init function to instantiate language object
* and create title, etc
*/
public function init()
{
try {
$this->objLanguage = $this->getObject('language', 'language');
$this->title = ucWords($this->objLanguage->code2Txt('mod_context_learneroutcomes', 'context'));
} catch (customException $e) {
customException::cleanUp();
}
}
开发者ID:ookwudili,项目名称:chisimba,代码行数:13,代码来源:block_contextoutcomes_class_inc.php
示例2: stringToName
/**
* Converts given string into CamelCased class name
*
* @return string
* @param string $string
*/
public static function stringToName($string)
{
$result = strToLower($string);
$result = str_replace('-', ' ', $result);
$result = ucWords($result);
$result = str_replace(' ', '', $result);
$result = trim($result);
return $result;
}
开发者ID:visor,项目名称:nano,代码行数:15,代码来源:Nano.php
示例3: getBlankXml
function getBlankXml($type)
{
$function = 'Pulsestorm\\Magento2\\Cli\\Xml_Template';
$function .= '\\getBlankXml' . ucWords(strToLower($type));
if (function_exists($function)) {
return call_user_func($function);
}
throw new Exception("No such type, {$type}");
}
开发者ID:benmarks,项目名称:pestle,代码行数:9,代码来源:module.php
示例4: common
/**
* Выполняет общее преобразование короткого имени в имя класса:
* - Приводит переданное значение к CamelCase
* - Удаляет знак "минус"
* - Заменяет знак "слеш" на разделитель пространства имён
*
* @return string
* @param string $value
*/
public static function common($value)
{
$result = preg_replace('/\\s+/', '', trim($value));
$result = strToLower($result);
$result = str_replace(array('-', '/'), array(' ', '. '), $result);
$result = ucWords($result);
$result = str_replace(array(' ', '.'), array('', NS), $result);
return trim($result);
}
开发者ID:visor,项目名称:nano,代码行数:18,代码来源:Names.php
示例5: init
/**
* Standard init function to instantiate language object
* and create title, etc
*/
public function init()
{
try {
$this->loadClass('link', 'htmlelements');
$this->objLanguage = $this->getObject('language', 'language');
$this->title = ucWords($this->objLanguage->code2Txt('mod_context_aboutcontext', 'context'));
} catch (customException $e) {
customException::cleanUp();
}
}
开发者ID:ookwudili,项目名称:chisimba,代码行数:14,代码来源:block_aboutcontext_class_inc.php
示例6: mb_convert_case
function mb_convert_case($str, $mode, $enc = '')
{
switch ($mode) {
case MB_CASE_LOWER:
return strToLower($str);
case MB_CASE_UPPER:
return strToUpper($str);
case MB_CASE_TITLE:
return ucWords(strToLower($str));
default:
return $str;
}
}
开发者ID:rkania,项目名称:GS3,代码行数:13,代码来源:mb_str_pad.php
示例7: init
/**
* Standard init function to instantiate language object
* and create title, etc
*/
public function init()
{
try {
$this->objLanguage = $this->getObject('language', 'language');
$this->title = ucWords($this->objLanguage->code2Txt('mod_context_allcontexts', 'context', NULL, 'All [-contexts-]'));
// HTML Elements
$this->loadClass('form', 'htmlelements');
$this->loadClass('dropdown', 'htmlelements');
$this->loadClass('button', 'htmlelements');
} catch (customException $e) {
customException::cleanUp();
}
}
开发者ID:ookwudili,项目名称:chisimba,代码行数:17,代码来源:block_context_class_inc.php
示例8: Radio
function Radio($name, $value = '', $class = 'check_radio', $js_event_str = '')
{
$data = $this->getStatusCodes();
$str = '';
foreach ($data as $k => $v) {
$slcted = '';
if ($v == $value) {
$slcted .= " checked='checked'";
}
$str .= "<input type='radio' name='" . $name . "' value='" . $v . "'" . $slcted . " class='" . $class . "'" . $js_event_str . "> " . ucWords($v) . " ";
}
return $str;
}
开发者ID:samplugins,项目名称:donation-system,代码行数:13,代码来源:clsAbstractStatusCodes.php
示例9: formatName
public static function formatName($name, $controller = true)
{
$result = strToLower($name);
$result = str_replace('-', ' ', $result);
$result = ucWords($result);
$result = str_replace(' ', '', $result);
$result = trim($result);
if ($controller) {
$result .= self::SUFFIX_CONTROLLER;
} else {
$result = strToLower($result[0]) . subStr($result, 1);
$result .= self::SUFFIX_ACTION;
}
return $result;
}
开发者ID:studio-v,项目名称:nano,代码行数:15,代码来源:Dispatcher.php
示例10: request
public function request($url, $post = null)
{
$method = $this->getUse();
if (in_array($method, $this->_methods)) {
$method_name = '_request' . ucWords($method);
if (!method_exists($this, $method_name)) {
throw new Exception("Method {$method_name} does not exists.");
}
if ($this->debug()) {
echo "\nTrying to get '{$url}' using " . strtoupper($method);
}
return call_user_func(array($this, $method_name), $url, $post);
} else {
throw new Exception('Method not seted.');
}
}
开发者ID:nataliajulieta,项目名称:old,代码行数:16,代码来源:frete.php
示例11: run
/**
* 呼び出し元のコントローラーから呼び出すモデルを判定しrun()を実行します。
*
* 実行モデル:
* 同一Bundle内にコントローラー名のControllerを省く文字のディレクトリ内にある
* 実行したActionをCamel式で表したファイル名
*/
protected final function run($inputParam = array())
{
$backtrace = debug_backtrace();
$controllerClass = get_class($this);
$functionName = $backtrace[1]['function'];
$serviceName = preg_replace('/Controller$/', '', preg_replace('/^.*\\\\/', '', $controllerClass));
$actionName = ucWords(preg_replace('/Action$/', '', $functionName));
$tmp = '\\Service\\' . $serviceName . '\\' . $actionName;
$classPath = preg_replace('/\\\\Controller.*$/', $tmp, $controllerClass);
$service = new $classPath($this->container);
if (is_null($service)) {
throw new \ErrorException('Service is not found.');
}
$result = $service->run($inputParam);
return $result;
}
开发者ID:iwatea,项目名称:Swim,代码行数:23,代码来源:AbstractController.php
示例12: init
/**
* Standard init function to instantiate language object
* and create title, etc
*/
public function init()
{
try {
$this->objLanguage = $this->getObject('language', 'language');
$this->objUserContext = $this->getObject('usercontext', 'context');
$this->objUser = $this->getObject('user', 'security');
$this->objContext = $this->getObject('dbcontext');
$this->objGroups = $this->getObject('groupAdminModel', 'groupadmin');
$this->title = ucWords($this->objLanguage->code2Txt('phrase_mycourses', 'system', NULL, 'My [-contexts-]'));
// HTML Elements
$this->loadClass('form', 'htmlelements');
$this->loadClass('dropdown', 'htmlelements');
$this->loadClass('button', 'htmlelements');
} catch (customException $e) {
customException::cleanUp();
}
}
开发者ID:ookwudili,项目名称:chisimba,代码行数:21,代码来源:block_mycontexts_class_inc.php
示例13: letrasIniciais
function letrasIniciais($nome, $minusculas = true)
{
$nome = ucWords(strtolower($nome));
#ESSA LINHA
$nome = ereg_replace("Da|De|Di|Do|Du", "", $nome);
# ESSA Tambem
preg_match_all('/\\s?([A-Z])/', $nome, $matches);
$ret = implode('', $matches[1]);
return $minusculas ? strtoupper($ret) : $ret;
}
开发者ID:jesseoliveira,项目名称:e-sic-livre-git,代码行数:10,代码来源:funcoes.php
示例14: _get_request_headers_as_string
function _get_request_headers_as_string()
{
global $_SERVER, $orig_url;
$ret = '';
$ret .= $_SERVER['REQUEST_METHOD'] . ' ' . $orig_url . ' ' . $_SERVER['SERVER_PROTOCOL'] . "\r\n";
foreach ($_SERVER as $k => $v) {
if (subStr($k, 0, 5) === 'HTTP_') {
$k = str_replace(' ', '-', ucWords(str_replace('_', ' ', strToLower(subStr($k, 5)))));
$ret .= $k . ': ' . $v . "\r\n";
}
}
$ret .= "\r\n";
return $ret;
}
开发者ID:hehol,项目名称:GemeinschaftPBX,代码行数:14,代码来源:prov-settings.php
示例15: execute
function execute(&$data, &$parent)
{
if (!array_key_exists($this->data, $data)) {
//echo "did not find " . $this->data;
return "";
}
$result = $data[$this->data];
if ($this->args) {
// print "[[" . $this->args . "]]";
$modifiers = preg_split("!\\s!", $this->args);
//print count($modifiers) . "modifiers";
// print_r($modifiers);
foreach ($modifiers as $modifierString) {
preg_match("!(\\w*)(.*)!", $modifierString, $matches);
//print_r($matches);
$modifier = $matches[1];
//print "[$modifier]";
$argumentString = $matches[2];
$arguments = array();
if ($argumentString) {
$delim = $argumentString[0];
$arguments = explode($delim, substr($argumentString, 1));
}
switch ($modifier) {
case 'capUpper':
$result = strtoupper($result);
break;
case 'capLower':
$result = strtolower($result);
break;
case 'capWord':
$result = ucWords($result);
break;
case 'capSentence':
$result = ucFirst($result);
break;
case 'trim':
$result = trim($result);
break;
case 'htmlencode':
$result = htmlentities($result);
break;
case 'htmldecode':
$result = html_entity_decode($result);
break;
case 'makesafe':
$result = mysql_real_escape_string($result);
break;
case 'utf8decode':
$result = utf8_decode($result);
break;
case 'utf8encode':
$result = utf8_encode($result);
break;
case 'strtotime':
$result = strtotime($result);
break;
case 'stripslashes':
$result = stripslashes($result);
break;
case 'addslashes':
$result = addslashes($result);
break;
case 'addone':
$result++;
break;
case 'number':
//print_r($arguments);
$dec = 2;
if (count($arguments) > 0) {
$dec = $arguments[0];
}
$dot = ",";
if (count($arguments) > 1) {
$dot = $arguments[1];
}
$sep = ".";
if (count($arguments) > 2) {
$sep = $arguments[2];
}
$result = number_format($result, $dec, $dot, $sep);
break;
case 'printf':
$format = "";
if (count($arguments) == 0) {
break;
}
$format = $arguments[0];
$result = sprintf($format, $result);
break;
case 'date':
$format = "";
if (count($arguments) == 0) {
break;
}
$format = $arguments[0];
$result = date($format, $result);
break;
default:
}
//.........这里部分代码省略.........
开发者ID:pdelbar,项目名称:onethree,代码行数:101,代码来源:value_tbd.php
示例16: setJSVars
public function setJSVars()
{
$objSysConfig = $this->getObject('altconfig', 'config');
$this->appendArrayVar('headerParams', '
<script type="text/javascript">
var pageSize = 500;
var lang = new Array();
lang["mycontext"] = "' . ucWords($this->objLanguage->code2Txt('phrase_mycourses', 'system', NULL, 'My [-contexts-]')) . '";
lang["contexts"] = "' . ucWords($this->objLanguage->code2Txt('wordcontext', 'system', NULL, '[-contexts-]')) . '";
lang["context"] = "' . ucWords($this->objLanguage->code2Txt('wordcontext', 'system', NULL, '[-context-]')) . '";
lang["othercontext"] = "' . ucWords($this->objLanguage->code2Txt('phrase_othercourses', 'system', NULL, 'Other [-contexts-]')) . '";
lang["searchcontext"] = "' . ucWords($this->objLanguage->code2Txt('phrase_allcourses', 'system', NULL, 'Search [-contexts-]')) . '";
lang["contextcode"] = "' . ucWords($this->objLanguage->code2Txt('mod_context_contextcode', 'system', NULL, '[-contexts-] Code')) . '";
lang["lecturers"] = "' . ucWords($this->objLanguage->code2Txt('word_lecturers', 'system', NULL, '[-authors-]')) . '";
lang["students"] = "' . ucWords($this->objLanguage->code2Txt('word_students', 'system', NULL, '[-readonly-]')) . '";
var baseUri = "' . $objSysConfig->getsiteRoot() . 'index.php";
var uri = "' . str_replace('&', '&', $this->uri(array('module' => 'context', 'action' => 'jsonlistcontext'))) . '";
var usercontexturi = "' . str_replace('&', '&', $this->uri(array('module' => 'context', 'action' => 'jsonusercontexts'))) . '";
var othercontexturi = "' . str_replace('&', '&', $this->uri(array('module' => 'context', 'action' => 'jsonusercontexts'))) . '";
contextPrivateMessage="' . $this->objLanguage->code2Txt('mod_context_privatecontextexplanation', 'context', NULL, 'This is a closed [-context-] only accessible to members') . '"; </script>');
}
开发者ID:ookwudili,项目名称:chisimba,代码行数:23,代码来源:block_contextmembers_class_inc.php
示例17: foreach
<ul>
<?php
foreach ($posts as $row) {
?>
<li class="cat-<?php
echo $row->page_category;
?>
">
<h4><?php
echo anchor('blog/' . $row->page_url, $row->page_title);
?>
</h4>
<small>
<span class="cat"><?php
echo anchor('blog/category/' . $row->page_category, ucWords($row->page_category));
?>
</span>
<time datetime="<?php
echo date('Y-m-d H:i:s', strtotime($row->page_datetime));
?>
" pubdate class="pubdate">
<?php
echo date('l jS F Y', strtotime($row->page_datetime));
?>
</time>
</small>
</li>
<?php
}
开发者ID:jamesdoc,项目名称:james-doc,代码行数:30,代码来源:blog_archive.php
示例18: isset
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><?php
echo isset($siteName) ? ucWords($siteName) : 'Tuts+';
?>
</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" />
<link rel="apple-touch-icon" href="img/tutsTouchIcon.jpg" />
<link rel="stylesheet" href="css/mobile.css" />
<link rel="stylesheet" href="css/article.css" />
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>
</head>
开发者ID:Benayoun,项目名称:javascript,代码行数:19,代码来源:header.php
示例19: foreach
foreach ($articulos as $key => $value) {
?>
<article class="post clear-fix">
<?php
echo Html::a(Html::img('@web/img/categories/' . $value->categoria->seo_slug . '.png', ['alt' => $value->categoria->categoria, 'class' => 'img-thumbnail']), ['/categoria/' . Html::encode("{$value->categoria->seo_slug}")], ['class' => 'thumb pull-left']);
?>
<h3 class="post-title">
<?php
echo Html::a(Html::encode("{$value->titulo}"), ['/articulo/' . Html::encode("{$value->seo_slug}")], ['title' => Html::encode("{$value->titulo}")]);
?>
</h3>
<div class="post-date">
<span class="glyphicon glyphicon-user"> </span><span class="post-author"><?php
echo ucWords(HTml::encode("{$value->createdBy->name}"));
?>
</span>
|
<span class="glyphicon glyphicon-calendar"> </span><?php
echo strftime("%c", strtotime($value->created_at));
?>
</div>
<p class="post-content">
<?php
if (empty($value->resumen)) {
echo HtmlPurifier::process(Helper::myTruncate($value->detalle, 300, " ", "..."));
} else {
echo $value->resumen;
}
开发者ID:blonder413,项目名称:blogyii2advancedtemplate,代码行数:31,代码来源:index.php
示例20: ucWords
<h1> <?php
echo ucWords($siteName);
?>
</h1>
</header>
<div data-role="content">
<h1> <?php
echo $feed->title;
?>
</h1>
<div> <?php
echo $feed->description;
?>
</div>
</div>
<footer data-role="footer" ">
<h4> <a href="<?php
echo $feed->guid->content;
?>
"> Leia em <?php
echo ucWords($siteName);
?>
</a></h4>
</footer>
</div>
</body>
</html>
开发者ID:ltgouvea,项目名称:RSS_Feeder,代码行数:30,代码来源:article.tmpl.php
注:本文中的ucWords函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论