當前位置: 首頁>>代碼示例>>PHP>>正文


PHP utf8_strtoupper函數代碼示例

本文整理匯總了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();
 }
開發者ID:heimrichhannot,項目名稱:contao-member_plus,代碼行數:28,代碼來源:ModuleMemberReader.php

示例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();
 }
開發者ID:respinar,項目名稱:contao-airquality,代碼行數:28,代碼來源:ModuleAirQualityFull.php

示例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();
 }
開發者ID:Acquisto,項目名稱:acquisto_core,代碼行數:27,代碼來源:ModuleAcquistoCategoryNav.php

示例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();
 }
開發者ID:juergen83,項目名稱:contao,代碼行數:34,代碼來源:ModuleListing.php

示例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();
 }
開發者ID:rheintechnology,項目名稱:core,代碼行數:38,代碼來源:ModuleRssReader.php

示例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();
 }
開發者ID:iCodr8,項目名稱:core,代碼行數:31,代碼來源:ModuleArticlenav.php

示例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 '';
 }
開發者ID:bytehead,項目名稱:contao-core,代碼行數:36,代碼來源:ModuleLogout.php

示例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();
 }
開發者ID:eknoes,項目名稱:core,代碼行數:30,代碼來源:ModuleCalendar.php

示例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();
 }
開發者ID:heimrichhannot,項目名稱:contao-calendar_plus,代碼行數:30,代碼來源:ModuleEventFilter.php

示例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();
 }
開發者ID:respinar,項目名稱:contao-carpet,代碼行數:29,代碼來源:ModuleCarpetList.php

示例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 '';
 }
開發者ID:terminal42,項目名稱:contao-z_modulealias,代碼行數:29,代碼來源:ModuleAlias.php

示例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();
     }
 }
開發者ID:jasongrout,項目名稱:dokuwiki-newpagetemplate,代碼行數:25,代碼來源:action.php

示例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;
}
開發者ID:HawesDomingue,項目名稱:mechanic-watson,代碼行數:17,代碼來源:ucwords.php

示例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));
 }
開發者ID:brunoxu,項目名稱:mycncart,代碼行數:35,代碼來源:manufacturer.php

示例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();
 }
開發者ID:markocupic,項目名稱:member_rating,代碼行數:35,代碼來源:MemberRatingDetail.php


注:本文中的utf8_strtoupper函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。