本文整理汇总了PHP中utf8_strtoupper函数的典型用法代码示例。如果您正苦于以下问题:PHP utf8_strtoupper函数的具体用法?PHP utf8_strtoupper怎么用?PHP utf8_strtoupper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了utf8_strtoupper函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['memberreader'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// logic for this is done in HeimrichHannot\Memberplus\Hooks::getPageIdFromUrlHook
if (\Input::get('article_reader')) {
\Input::setGet('items', \Input::get('article_reader'));
} else {
if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item'])) {
\Input::setGet('items', \Input::get('auto_item'));
}
}
if (!\Input::get('items')) {
return '';
}
$this->mlGroups = deserialize($this->mlGroups);
if (!is_array($this->mlGroups) || empty($this->mlGroups)) {
return '';
}
return parent::generate();
}
示例2: generate
/**
* Generate the module
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['mod_airquality_full'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Set the item from the auto_item parameter
if (!isset($_GET['items']) && $GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
\Input::setGet('items', \Input::get('auto_item'));
}
// Return if there are no items
if (!\Input::get('items')) {
return '';
}
if (TL_MODE == 'FE') {
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/airquality/assets/js/Chart.min.js|static';
$GLOBALS['TL_CSS'][] = 'system/modules/airquality/assets/styles/style.css';
}
return parent::generate();
}
示例3: generate
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['acquisto_category_nav'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
if (FE_USER_LOGGED_IN) {
$this->Import('FrontendUser', 'Member');
}
$this->generateTrail(\Input::get('category'));
$pid = 0;
if ($this->acquisto_levelOffset != 0) {
$pid = $this->trail[$this->acquisto_levelOffset - 1];
} elseif ($this->acquisto_referenceCategory) {
$pid = $this->acquisto_referenceCategory;
}
$this->items = $this->getCategory($pid, $this->acquisto_levelOffset, 0, $this->acquisto_hardlimit);
if (!is_array($this->items)) {
return '';
}
return parent::generate();
}
示例4: generate
/**
* Display a wildcard in the back end
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['listing'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Return if the table or the fields have not been set
if ($this->list_table == '' || $this->list_fields == '') {
return '';
}
// Disable the details page
if (\Input::get('show') && $this->list_info == '') {
return '';
}
// Fallback to the default template
if ($this->list_layout == '') {
$this->list_layout = 'list_default';
}
$this->strTemplate = $this->list_layout;
$this->list_where = $this->replaceInsertTags($this->list_where, false);
$this->list_info_where = $this->replaceInsertTags($this->list_info_where, false);
return parent::generate();
}
示例5: generate
/**
* Display a wildcard in the back end
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['rss_reader'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = '' . $GLOBALS['TL_CONFIG']['backendPath'] . '/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->objFeed = new \SimplePie();
$arrUrls = trimsplit('[\\n\\t ]', trim($this->rss_feed));
if (count($arrUrls) > 1) {
$this->objFeed->set_feed_url($arrUrls);
} else {
$this->objFeed->set_feed_url($arrUrls[0]);
}
$this->objFeed->set_output_encoding(\Config::get('characterSet'));
$this->objFeed->set_cache_location(TL_ROOT . '/system/tmp');
$this->objFeed->enable_cache(false);
if ($this->rss_cache > 0) {
$this->objFeed->enable_cache(true);
$this->objFeed->set_cache_duration($this->rss_cache);
}
if (!$this->objFeed->init()) {
$this->log('Error importing RSS feed "' . $this->rss_feed . '"', __METHOD__, TL_ERROR);
return '';
}
$this->objFeed->handle_content_type();
return parent::generate();
}
示例6: generate
/**
* Do not display the module if there are no articles
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['articlenav'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
global $objPage;
$this->objArticles = \ArticleModel::findPublishedWithTeaserByPidAndColumn($objPage->id, $this->strColumn);
// Return if there are no articles
if ($this->objArticles === null) {
return '';
}
// Redirect to the first article if no article is selected
if (!\Input::get('articles')) {
if (!$this->loadFirst) {
return '';
}
$strAlias = $this->objArticles->alias != '' && !\Config::get('disableAlias') ? $this->objArticles->alias : $this->objArticles->id;
$this->redirect($this->addToUrl('articles=' . $strAlias));
}
return parent::generate();
}
示例7: generate
/**
* Logout the current user and redirect
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['logout'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Set last page visited
if ($this->redirectBack) {
$_SESSION['LAST_PAGE_VISITED'] = $this->getReferer();
}
$this->import('FrontendUser', 'User');
$strRedirect = \Environment::get('base');
// Redirect to last page visited
if ($this->redirectBack && !empty($_SESSION['LAST_PAGE_VISITED'])) {
$strRedirect = $_SESSION['LAST_PAGE_VISITED'];
} elseif ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null) {
/** @var \PageModel $objTarget */
$strRedirect = $objTarget->getFrontendUrl();
}
// Log out and redirect
if ($this->User->logout()) {
$this->redirect($strRedirect);
}
return '';
}
示例8: generate
/**
* Do not show the module if no calendar has been selected
*
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
/** @var \BackendTemplate|object $objTemplate */
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['calendar'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
return '';
}
$this->strUrl = preg_replace('/\\?.*$/', '', \Environment::get('request'));
$this->strLink = $this->strUrl;
if ($this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null) {
/** @var \PageModel $objTarget */
$this->strLink = $objTarget->getFrontendUrl();
}
return parent::generate();
}
示例9: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['eventlist_plus'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
// Return if there are no calendars
if (!is_array($this->cal_calendar) || empty($this->cal_calendar)) {
return '';
}
parent::generate();
// needs to be overwritten in model, otherwise datacontainer argument in options_callback contains protected calendars
$this->objModel->cal_calendar = $this->sortOutProtected(deserialize($this->cal_calendar, true));
$objForm = new EventFilterForm($this->objModel);
if (($strForm = $objForm->generate()) === null) {
return '';
}
$this->Template->form = $objForm->generate();
return $this->Template->parse();
}
示例10: generate
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['carpet_list'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$this->carpet_categories = $this->sortOutProtected(deserialize($this->carpet_categories));
// No carpaets categries available
if (!is_array($this->carpet_categories) || empty($this->carpet_categories)) {
return '';
}
// Show the catalog detail if an item has been selected
if ($this->carpet_detailModule > 0 && (isset($_GET['items']) || $GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item']))) {
return $this->getFrontendModule($this->carpet_detailModule, $this->strColumn);
}
if (TL_MODE == 'FE') {
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/carpet/assets/jquery.raty.min.js|static';
}
return parent::generate();
}
示例11: generate
public function generate()
{
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['modulealias'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
$arrModules = deserialize($this->aliasModules);
if (is_array($arrModules) && count($arrModules)) {
global $objPage;
$objModules = $this->Database->execute("SELECT id, aliasPages FROM tl_module WHERE id IN (" . implode(',', $arrModules) . ") ORDER BY " . $this->Database->findInSet('id', $arrModules));
while ($objModules->next()) {
$arrPages = deserialize($objModules->aliasPages);
if (is_array($arrPages) && count($arrPages)) {
foreach ($arrPages as $intPage) {
$arrPages = array_merge($arrPages, $this->getChildRecords($intPage, 'tl_page', false));
}
if (in_array($objPage->id, $arrPages)) {
return $this->getFrontendModule($objModules->id, $this->inColumn);
}
}
}
}
return '';
}
示例12: pagefromtemplate
function pagefromtemplate(&$event, $param)
{
if (strlen(trim($_REQUEST['newpagetemplate'])) > 0) {
global $conf;
global $INFO;
global $ID;
$tpl = io_readFile(wikiFN($_REQUEST['newpagetemplate']));
if ($this->getConf('userreplace')) {
$stringvars = array_map(create_function('$v', 'return explode(",",$v,2);'), explode(';', $_REQUEST['newpagevars']));
foreach ($stringvars as $value) {
$tpl = str_replace(trim($value[0]), trim($value[1]), $tpl);
}
}
if ($this->getConf('standardreplace')) {
// replace placeholders
$file = noNS($ID);
$page = strtr($file, '_', ' ');
$tpl = str_replace(array('@ID@', '@NS@', '@FILE@', '@!FILE@', '@!FILE!@', '@PAGE@', '@!PAGE@', '@!!PAGE@', '@!PAGE!@', '@USER@', '@NAME@', '@MAIL@', '@DATE@'), array($ID, getNS($ID), $file, utf8_ucfirst($file), utf8_strtoupper($file), $page, utf8_ucfirst($page), utf8_ucwords($page), utf8_strtoupper($page), $_SERVER['REMOTE_USER'], $INFO['userinfo']['name'], $INFO['userinfo']['mail'], $conf['dformat']), $tpl);
// we need the callback to work around strftime's char limit
$tpl = preg_replace_callback('/%./', create_function('$m', 'return strftime($m[0]);'), $tpl);
}
$event->result = $tpl;
$event->preventDefault();
}
}
示例13: utf8_ucwords_callback
/**
* Callback function for preg_replace_callback call in utf8_ucwords
* You don't need to call this yourself
* @param array of matches corresponding to a single word
* @return string with first char of the word in uppercase
* @see utf8_ucwords
* @see utf8_strtoupper
* @package utf8
* @subpackage strings
*/
function utf8_ucwords_callback($matches)
{
$leadingws = $matches[2];
$ucfirst = utf8_strtoupper($matches[3]);
$ucword = utf8_substr_replace(ltrim($matches[0]), $ucfirst, 0, 1);
return $leadingws . $ucword;
}
示例14: index
public function index()
{
$this->load->language('product/manufacturer');
$this->load->model('catalog/manufacturer');
$this->load->model('tool/image');
$this->document->setTitle($this->language->get('heading_title'));
$data['heading_title'] = $this->language->get('heading_title');
$data['text_index'] = $this->language->get('text_index');
$data['text_empty'] = $this->language->get('text_empty');
$data['button_continue'] = $this->language->get('button_continue');
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home'));
$data['breadcrumbs'][] = array('text' => $this->language->get('text_brand'), 'href' => $this->url->link('product/manufacturer'));
$data['categories'] = array();
$results = $this->model_catalog_manufacturer->getManufacturers();
foreach ($results as $result) {
if (is_numeric(utf8_substr($result['name'], 0, 1))) {
$key = '0 - 9';
} else {
$key = utf8_substr(utf8_strtoupper($result['name']), 0, 1);
}
if (!isset($data['categories'][$key])) {
$data['categories'][$key]['name'] = $key;
}
$data['categories'][$key]['manufacturer'][] = array('name' => $result['name'], 'href' => $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $result['manufacturer_id']));
}
$data['continue'] = $this->url->link('common/home');
$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
$data['content_top'] = $this->load->controller('common/content_top');
$data['content_bottom'] = $this->load->controller('common/content_bottom');
$data['footer'] = $this->load->controller('common/footer');
$data['header'] = $this->load->controller('common/header');
$this->response->setOutput($this->load->view('product/manufacturer_list', $data));
}
示例15: generate
/**
* @return string
*/
public function generate()
{
// Backend
if (TL_MODE == 'BE') {
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['member_rating'][0]) . ' ###';
$objTemplate->title = $this->headline;
$objTemplate->id = $this->id;
$objTemplate->link = $this->name;
$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;
return $objTemplate->parse();
}
// Set the item from the auto_item parameter
if ($GLOBALS['TL_CONFIG']['useAutoItem'] && isset($_GET['auto_item'])) {
\Input::setGet('member', \Input::get('auto_item'));
}
// activate comment by token via url
if (strlen(\Input::get('activation_token'))) {
$this->activateOrDelete();
exit;
}
// set the ratedUser var
$this->ratedUser = \MemberModel::findByPk(\Input::get('member'));
if ($this->ratedUser === null) {
return '';
}
// overwrite default template
if ($this->memberRatingDetailTemplate != '') {
$this->strTemplate = $this->memberRatingDetailTemplate;
}
return parent::generate();
}