upper() static public method

An UTF-8 safe version of strotoupper()
static public upper ( string $str ) : string
$str string
return string
コード例 #1
0
ファイル: server.php プロジェクト: chrishiam/LVSL
 /**
  * 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);
 }
コード例 #2
0
ファイル: server.php プロジェクト: muten84/luigibifulco.it
 /**
  * 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);
 }
コード例 #3
0
 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));
 }
コード例 #4
0
ファイル: escape.php プロジェクト: muten84/luigibifulco.it
 /**
  * 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)));
 }
コード例 #5
0
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();
        }
コード例 #6
0
ファイル: kirby.php プロジェクト: sdvig/kirbycms
 /** 
  * 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);
 }
コード例 #7
0
ファイル: default.php プロジェクト: alkaest2002/risky2
<!-- 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>
コード例 #8
0
/**
 * 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
コード例 #9
0
ファイル: tests.php プロジェクト: alkaest2002/risky2
?>
<!-- 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>
コード例 #10
0
ファイル: StrTest.php プロジェクト: aoimedia/kosmonautensofa
 public function testUpper()
 {
     $this->assertEquals('SUPER ÄWESØME STRING', str::upper($this->sample));
 }
コード例 #11
0
ファイル: date.php プロジェクト: aoimedia/kosmonautensofa
 public function format()
 {
     return str::upper($this->format);
 }
コード例 #12
0
ファイル: date.php プロジェクト: irenehilber/kirby-base
 public function format()
 {
     $format = str::upper($this->format);
     return empty($format) ? 'YYYY-MM-DD' : $format;
 }
コード例 #13
0
    ?>
  <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>
コード例 #14
0
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