当前位置: 首页>>代码示例>>PHP>>正文


PHP str::upper方法代码示例

本文整理汇总了PHP中str::upper方法的典型用法代码示例。如果您正苦于以下问题:PHP str::upper方法的具体用法?PHP str::upper怎么用?PHP str::upper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在str的用法示例。


在下文中一共展示了str::upper方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get

 /**
  * Gets a value from the _SERVER array
  * 
  * <code>
  * 
  * server::get('document_root');
  * // sample output: /var/www/kirby
  * 
  * server::get();
  * // returns the whole server array
  *
  * </code>   
  *
  * @param  mixed    $key The key to look for. Pass false or null to return the entire server array. 
  * @param  mixed    $default Optional default value, which should be returned if no element has been found
  * @return mixed
  */
 public static function get($key = false, $default = null)
 {
     if (empty($key)) {
         return $_SERVER;
     }
     return a::get($_SERVER, str::upper($key), $default);
 }
开发者ID:chrishiam,项目名称:LVSL,代码行数:24,代码来源:server.php

示例2: get

 /**
  * Gets a value from the _SERVER array
  * 
  * <code>
  * 
  * server::get('document_root');
  * // sample output: /var/www/kirby
  * 
  * server::get();
  * // returns the whole server array
  *
  * </code>   
  *
  * @param  mixed    $key The key to look for. Pass false or null to return the entire server array. 
  * @param  mixed    $default Optional default value, which should be returned if no element has been found
  * @return mixed
  */
 public static function get($key = false, $default = null)
 {
     if (empty($key)) {
         return $_SERVER;
     }
     $key = str::upper($key);
     $value = a::get($_SERVER, $key, $default);
     return static::sanitize($key, $value);
 }
开发者ID:muten84,项目名称:luigibifulco.it,代码行数:26,代码来源:server.php

示例3: getMonthBoard

 public function getMonthBoard($month, $year)
 {
     // Calendar language
     date_default_timezone_set('UTC');
     $l = panel()->language();
     setlocale(LC_ALL, $l . '_' . str::upper($l));
     //setlocale(LC_ALL, 'us_US');
     // Calendar stuff
     $cal = new Calendarboard\calendar();
     $currentMonth = $cal->month($year, $month);
     return tpl::load(__DIR__ . DS . 'template.php', array('currentMonth' => $currentMonth, 'get_day_route_url' => purl($this->model(), 'field/' . $this->field()->name . '/calendarboard/get-day/'), 'calendarboard_url' => $this->model(), 'year_folder' => '/year-' . $year));
 }
开发者ID:molocLab,项目名称:kirby-calendar-board,代码行数:12,代码来源:controller.php

示例4: escapeJSChar

 /**
  * Escape character for JavaScript
  * 
  * Callback function for preg_replace_callback() that applies Javascript
  * escaping to all matches.
  * 
  * @param  array  $matches
  * @return string
  */
 protected static function escapeJSChar($matches)
 {
     $char = $matches[0];
     if (str::length($char) == 1) {
         return sprintf('\\x%02X', ord($char));
     }
     $char = static::convertEncoding($char);
     return sprintf('\\u%04s', str::upper(bin2hex($char)));
 }
开发者ID:muten84,项目名称:luigibifulco.it,代码行数:18,代码来源:escape.php

示例5: alphabetise

if (param('section')) {
    $alphabetise = alphabetise($page->children()->filterBy('section', params('section'))->sortby('title'), array('key' => 'title'));
} else {
    $alphabetise = alphabetise($page->children()->sortby('title'), array('key' => 'title'));
}
?>

<?php 
foreach ($alphabetise as $letter => $items) {
    ?>
    <h2 class="index" id="<?php 
    echo $letter;
    ?>
"><?php 
    echo str::upper($letter);
    ?>
</h2>
    <ul class="<?php 
    echo $type;
    ?>
 listing">
    <?php 
    foreach ($items as $item) {
        ?>
        <?php 
        if ($item->short_title()->isNotEmpty()) {
            $title = $item->short_title();
        } else {
            $title = $item->title();
        }
开发者ID:austinvernsonger,项目名称:bradshawsguide,代码行数:30,代码来源:alphabetise.php

示例6: ucfirst

 /** 
  * An UTF-8 safe version of ucfirst()
  * 
  * @param  string  $string 
  * @return string 
  */
 static function ucfirst($str)
 {
     return str::upper(str::substr($str, 0, 1)) . str::substr($str, 1);
 }
开发者ID:sdvig,项目名称:kirbycms,代码行数:10,代码来源:kirby.php

示例7: snippet

<!-- END HEADER -->

<!-- NAVBAR -->
<?php 
snippet('navbar');
?>
<!-- END NAVBAR -->

<!-- MAIN -->
<div class="container">
	<div class="row">
		
		<!-- title -->
		<div id="page-title" class="col-xs-12">
			<h3><?php 
echo str::upper($page->title()->html());
?>
</h3>
		</div>
		<!-- end title -->

		<!-- intro -->
		<div id="page-intro" class="col-xs-12">
			<?php 
echo $page->text();
?>
		</div>
		<!-- end intro -->

	</div>
</div>
开发者ID:alkaest2002,项目名称:risky2,代码行数:31,代码来源:default.php

示例8: function

/**
 * Converts the field value to lower case
 * @param Field $field The calling Kirby Field instance
 * @return Field
 */
field::$methods['lower'] = function ($field) {
    $field->value = str::lower($field->value);
    return $field;
};
/**
 * Converts the field value to upper case
 * @param Field $field The calling Kirby Field instance
 * @return Field
 */
field::$methods['upper'] = function ($field) {
    $field->value = str::upper($field->value);
    return $field;
};
/**
 * Applies the widont rule to avoid single 
 * words on the last line
 * @param Field $field The calling Kirby Field instance
 * @return Field
 */
field::$methods['widont'] = function ($field) {
    $field->value = widont($field->value);
    return $field;
};
/**
 * Creates a simple text excerpt without formats
 * @param Field $field The calling Kirby Field instance
开发者ID:kristianhalte,项目名称:super_organic,代码行数:31,代码来源:methods.php

示例9:

?>
<!-- END NAVBAR -->

<!-- MAIN -->
<div id="tests-page" class="container">
	
	<div class="row">
		
		<div class="col-xs-12">
			
			<div class="row"
				
				<!-- title -->
				<div id="page-title" class="col-xs-12">
					<h3><?php 
echo str::upper($page->title());
?>
</h3>	
				</div>
				<!-- end title -->

				<?php 
if ($tests) {
    ?>
					
					<!-- take test intro -->
					<div id="page-intro" class="col-xs-12">
						<?php 
    echo $page->text()->kirbytext();
    ?>
					</div>
开发者ID:alkaest2002,项目名称:risky2,代码行数:31,代码来源:tests.php

示例10: testUpper

 public function testUpper()
 {
     $this->assertEquals('SUPER ÄWESØME STRING', str::upper($this->sample));
 }
开发者ID:aoimedia,项目名称:kosmonautensofa,代码行数:4,代码来源:StrTest.php

示例11: format

 public function format()
 {
     return str::upper($this->format);
 }
开发者ID:aoimedia,项目名称:kosmonautensofa,代码行数:4,代码来源:date.php

示例12: format

 public function format()
 {
     $format = str::upper($this->format);
     return empty($format) ? 'YYYY-MM-DD' : $format;
 }
开发者ID:irenehilber,项目名称:kirby-base,代码行数:5,代码来源:date.php

示例13: foreach

    ?>
  <select class="lang" onchange="window.location = this.value">
    <?php 
    foreach (c::get('lang.available') as $lang) {
        ?>
  
    <option value="<?php 
        echo languageToggle($lang);
        ?>
"<?php 
        if ($lang == c::get('lang.current')) {
            echo ' selected="selected"';
        }
        ?>
><?php 
        echo str::upper($lang);
        ?>
</option>
    <?php 
    }
    ?>
  </select>
  <?php 
}
?>

  <?php 
snippet('pages');
?>
</div>
开发者ID:codecuts,项目名称:lanningsmith-website,代码行数:30,代码来源:header.php

示例14: gmdate

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//<?php 
echo $site->url();
?>
//Kirby Calendar Plugin//<?php 
echo str::upper($site->language()->code());
?>
 
METHOD:PUBLISH
<?php 
foreach ($calendar->getAllEvents() as $event) {
    ?>
BEGIN:VEVENT
DTSTART:<?php 
    echo gmdate('Ymd\\THis\\Z', $event->getBeginTimestamp());
    ?>
 
DTEND:<?php 
    echo gmdate('Ymd\\THis\\Z', $event->getEndTimestamp());
    ?>
 
SUMMARY:<?php 
    echo $event->getField('summary');
    ?>
 
DESCRIPTION:<?php 
    echo $event->getField('description');
    ?>
 
LOCATION:<?php 
开发者ID:igorqr,项目名称:kirby-extensions,代码行数:31,代码来源:calendar-ical.php


注:本文中的str::upper方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。