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


PHP MultiByte::ucfirst方法代码示例

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


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

示例1: array

            ?>
				<?php 
            echo $post->title == '' ? '&nbsp;' : Utils::htmlspecialchars($post->title);
            ?>
			<?php 
        }
        ?>
		</span>
		<span class="state pct10"><a href="<?php 
        URL::out('admin', array('page' => 'posts', 'type' => $post->content_type, 'status' => $post->status));
        ?>
" title="<?php 
        _e('Search for other %s items', array(MultiByte::ucfirst(Plugins::filter("post_status_display", $post->statusname))));
        ?>
"><?php 
        echo MultiByte::ucfirst(Plugins::filter("post_status_display", $post->statusname));
        ?>
</a></span>
		<span class="author pct20"><span class="dim"><?php 
        _e('by');
        ?>
</span> <a href="<?php 
        URL::out('admin', array('page' => 'posts', 'user_id' => $post->user_id, 'type' => $post->content_type, 'status' => 'any'));
        ?>
" title="<?php 
        _e('Search for other items by %s', array($post->author->displayname));
        ?>
"><?php 
        echo $post->author->displayname;
        ?>
</a></span>
开发者ID:wwxgitcat,项目名称:habari,代码行数:31,代码来源:posts_items.php

示例2: testUcfirst

	public function testUcfirst ( ) {
		
		$this->assertEquals( MultiByte::ucfirst( $this->test_strings['lowercase'] ), $this->test_strings['ucfirst'] );
		
		// perform a single test with an ascii string for code coverage
		$this->assertEquals( MultiByte::ucfirst( 'abcd', 'ascii' ), 'Abcd' );
		
	}
开发者ID:rick-c,项目名称:tests,代码行数:8,代码来源:multiByteTest.php

示例3: test_ucfirst

 public function test_ucfirst()
 {
     $this->assert_equal(MultiByte::ucfirst($this->test_strings['lowercase']), $this->test_strings['ucfirst']);
     $this->assert_equal(MultiByte::ucfirst('abcd'), 'Abcd');
 }
开发者ID:habari,项目名称:tests,代码行数:5,代码来源:test_multibyte.php

示例4: if

?>
<div class="item clear <?php echo $post->statusname; ?>" id="post_<?php echo $post->id; ?>">
	<div class="head clear">
		<?php if ( ACL::access_check( $post_permissions, 'delete' ) ) { ?>
		<span class="checkbox title pct5">
			<input type="checkbox" class="checkbox" name="checkbox_ids[<?php echo $post->id; ?>]" id="checkbox_ids[<?php echo $post->id; ?>]">
		</span>
		<?php } ?>
		<span class="checkbox title pct30">
			<?php if ( ACL::access_check( $post_permissions, 'edit' ) ) { ?>
				<a href="<?php echo URL::out('admin', 'page=publish&id=' . $post->id); ?>" class="title" title="<?php _e('Edit \'%s\'', array( Utils::htmlspecialchars( $post->title ) ) ) ?>"><?php echo ($post->title == '') ? '&nbsp;' : Utils::htmlspecialchars( $post->title ); ?></a>
			<?php } else { ?>
				<?php echo ($post->title == '') ? '&nbsp;' : Utils::htmlspecialchars( $post->title ); ?>
			<?php } ?>
		</span>
		<span class="state pct10"><a href="<?php URL::out('admin', array('page' => 'posts', 'type' => $post->content_type, 'status' => $post->status ) ); ?>" title="<?php _e('Search for other %s items', array( MultiByte::ucfirst( Plugins::filter( "post_status_display", $post->statusname ) ) ) ); ?>"><?php echo MultiByte::ucfirst( Plugins::filter( "post_status_display", $post->statusname ) ); ?></a></span>
		<span class="author pct20"><span class="dim"><?php _e('by'); ?></span> <a href="<?php URL::out('admin', array('page' => 'posts', 'user_id' => $post->user_id, 'type' => $post->content_type, 'status' => 'any') ); ?>" title="<?php _e('Search for other items by %s', array( $post->author->displayname ) ) ?>"><?php echo $post->author->displayname; ?></a></span>
		<span class="date pct15"><span class="dim"><?php _e('on'); ?></span> <a href="<?php URL::out('admin', array('page' => 'posts', 'type' => $post->content_type, 'year_month' => $post->pubdate->get('Y-m') ) ); ?>" title="<?php _e('Search for other items from %s', array( $post->pubdate->get( 'M, Y' ) ) ); ?>"><?php $post->pubdate->out( HabariDateTime::get_default_date_format() ); ?></a></span>
		<span class="time pct10"><span class="dim"><?php _e('at'); ?> <?php $post->pubdate->out( HabariDateTime::get_default_time_format()); ?></span></span>

		<ul class="dropbutton">
			<?php $actions = array(
				'edit' => array('url' => URL::get('admin', 'page=publish&id=' . $post->id), 'title' => sprintf( _t('Edit \'%s\''), $post->title ), 'label' => _t('Edit'), 'permission' => 'edit' ),
				'view' => array('url' => $post->permalink . '?preview=1', 'title' => sprintf( _t('View \'%s\''), $post->title ), 'label' => _t('View') ),
				'remove' => array('url' => 'javascript:itemManage.remove('. $post->id . ', \'post\');', 'title' => _t('Delete this item'), 'label' => _t('Delete'), 'permission' => 'delete' )
			);
			$actions = Plugins::filter('post_actions', $actions, $post);
			foreach( $actions as $action ) :
			?>
				<?php if ( !isset( $action['permission'] ) || ACL::access_check( $post_permissions, $action['permission'] ) ) { ?>
				<li><a href="<?php echo $action['url']; ?>" title="<?php echo $action['title']; ?>"><?php echo $action['label']; ?></a></li>
开发者ID:rynodivino,项目名称:system,代码行数:31,代码来源:posts_items.php

示例5: post_comments

 /**
  * Handles the submission of the comment moderation form.
  * @todo Separate delete from "delete until purge"
  */
 public function post_comments()
 {
     // Get special search statuses
     $statuses = Comment::list_comment_statuses();
     $labels = array_map(function ($a) {
         return MultiByte::ucfirst(Plugins::filter("comment_status_display", $a));
     }, $statuses);
     $terms = array_map(function ($a) {
         return "status:{$a}";
     }, $statuses);
     $statuses = array_combine($terms, $labels);
     // Get special search types
     $types = Comment::list_comment_types();
     $labels = array_map(function ($a) {
         return MultiByte::ucfirst(Plugins::filter("comment_type_display", $a, "singular"));
     }, $types);
     $terms = array_map(function ($a) {
         return "type:{$a}";
     }, $types);
     $types = array_combine($terms, $labels);
     $this->theme->special_searches = array_merge($statuses, $types);
     $this->fetch_comments();
     $this->display('comments');
 }
开发者ID:wwxgitcat,项目名称:habari,代码行数:28,代码来源:admincommentshandler.php

示例6: testUcfirst

	public function testUcfirst ( ) {
		
		// test the native method
		$this->assertNotEquals( MultiByte::ucfirst( $this->test_strings['lowercase'] ), $this->test_strings['ucfirst'] );
		$this->assertEquals( MultiByte::ucfirst( 'abcd' ), 'Abcd' );
		
	}
开发者ID:rick-c,项目名称:tests,代码行数:7,代码来源:multiByteNativeTest.php

示例7: post_posts

 /**
  * Handles POST values from /manage/posts.
  * Used to control what content to show / manage.
  */
 public function post_posts()
 {
     $this->fetch_posts();
     // Get special search statuses
     $statuses = array_keys(Post::list_post_statuses());
     array_shift($statuses);
     $labels = array_map(function ($a) {
         return MultiByte::ucfirst(Plugins::filter("post_status_display", $a));
     }, $statuses);
     $terms = array_map(function ($a) {
         return "status:{$a}";
     }, $statuses);
     $statuses = array_combine($terms, $labels);
     // Get special search types
     $types = array_keys(Post::list_active_post_types());
     array_shift($types);
     $labels = array_map(function ($a) {
         return Plugins::filter("post_type_display", $a, "singular");
     }, $types);
     $terms = array_map(function ($a) {
         return "type:{$a}";
     }, $types);
     $types = array_combine($terms, $labels);
     $special_searches = array_merge($statuses, $types);
     // Add a filter to get the only the user's posts
     $special_searches["author:" . User::identify()->username] = _t('My Posts');
     $this->theme->admin_page = _t('Manage Posts');
     $this->theme->admin_title = _t('Manage Posts');
     $this->theme->special_searches = Plugins::filter('special_searches', $special_searches);
     $this->display('posts');
 }
开发者ID:wwxgitcat,项目名称:habari,代码行数:35,代码来源:adminpostshandler.php

示例8: filter_dash_module_post_types_and_statuses

	/**
	 * filter_dash_module_post_types
	 * Function used to set theme variables to the post types dashboard widget
	 * @param string $module_id
	 * @return string The contents of the module
	 */
	public function filter_dash_module_post_types_and_statuses( $module, $module_id, $theme )
	{
		$messages = array();
		$user = User::identify();

		$post_types = Post::list_active_post_types();
		array_shift( $post_types );
		$post_statuses = array_values( Post::list_post_statuses() );
		array_shift( $post_statuses );

		foreach( $post_types as $type => $type_id ) {
			$plural = Plugins::filter( 'post_type_display', $type, 'plural' );
			foreach( $post_statuses as $status => $status_id ) {
				$status_display = MultiByte::ucfirst( Plugins::filter( 'post_status_display', Post::status_name( $status_id ) ) );
				$site_count = Posts::get( array( 'content_type' => $type_id, 'count' => true, 'status' => $status_id ) );
				$user_count = Posts::get( array( 'content_type' => $type_id, 'count' => true, 'status' => $status_id, 'user_id' => $user->id ) );

				// @locale First variable is the post status, second is the post type
				$message['label'] = _t( '%1$s %2$s', array( $status_display, $plural ) );

				if( ! $site_count ) {
					$message['site_count'] = '';
				}
				else if( $user->cannot( 'post_unpublished' ) && Post::status_name( $status_id ) != 'published' ) {
					$message['site_count'] = '';
				}
				else {
					$message['site_count'] = $site_count;
				}
				$perms = array(
					'post_any' => array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) ),
					'own_posts' => array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) ),
					'post_' . $type => array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) ),
				);
				if ( $user->can_any( $perms ) && $message['site_count'] ) {
					$message['site_count'] = '<a href="' . Utils::htmlspecialchars( URL::get( 'admin', array( 'page' => 'posts', 'type' => Post::type( $type ), 'status' => $status_id ) ) ) . '">' . Utils::htmlspecialchars( $message['site_count'] ) . '</a>';
				}

				if( ! $user_count ) {
					$message['user_count'] = '';
				}
				else {
					$message['user_count'] = $user_count;
				}
				// @locale First variable is the post status, second is the post type
				$perms = array(
					'own_posts' => array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) ),
					'post_' . $type => array( ACL::get_bitmask( 'delete' ), ACL::get_bitmask( 'edit' ) ),
				);
				if ( $user->can_any( $perms )  && $message['user_count'] ) {
					$message['user_count'] = '<a href="' . Utils::htmlspecialchars( URL::get( 'admin', array( 'page' => 'posts', 'type' => Post::type( $type ), 'status' => $status_id, 'user_id' => $user->id ) ) ) . '">' . Utils::htmlspecialchars( $message['user_count'] ) . '</a>';
				}

				if( $message['site_count'] || $message['user_count'] ) {
					$messages[] = $message;
				}
			}
		}

		$theme->type_messages = $messages;

		$module['title'] = _t( 'Post Types and Statuses' );
		$module['content'] = $theme->fetch( 'dash_posttypes' );
		return $module;
	}
开发者ID:rynodivino,项目名称:system,代码行数:71,代码来源:coredashmodules.plugin.php

示例9: _t

                $u_title = _t('%1$s update: %3$s', array(MultiByte::ucfirst($u['severity']), $u['date'], Utils::htmlspecialchars($u['text'])));
            }
            if (!empty($u['url'])) {
                $u_string = sprintf('<a href="%1$s" title="%2$s" class="%3$s">%4$s</a>', $u['url'], $u_title, $u['severity'], $u['version']);
            } else {
                $u_string = sprintf('<span title="%1$s" class="%2$s">%3$s</span>', $u_title, $u['severity'], $u['version']);
            }
            // add it to the array of updates available for this plugin
            $u_strings[$u['version']] = $u_string;
        }
        $u_strings = Format::and_list($u_strings);
        ?>
								
									<li class="update">
										<?php 
        echo _t('%1$s <a href="%2$s">%3$s</a> has the following updates available: %4$s', array(MultiByte::ucfirst($beacon['type']), $beacon['url'], $beacon['name'], $u_strings));
        ?>
									</li>
								
								<?php 
    }
    ?>
						
					</ul>
					
				<?php 
}
?>

</div>
开发者ID:wwxgitcat,项目名称:habari,代码行数:30,代码来源:dashboard.php

示例10: post_comments

 /**
  * Handles the submission of the comment moderation form.
  * @todo Separate delete from "delete until purge"
  */
 public function post_comments()
 {
     // Get special search statuses
     $statuses = Comment::list_comment_statuses();
     $labels = array_map(function ($a) {
         return MultiByte::ucfirst(Plugins::filter("comment_status_display", $a));
     }, $statuses);
     $terms = array_map(function ($a) {
         return "status:{$a}";
     }, $statuses);
     $statuses = array_combine($terms, $labels);
     // Get special search types
     $types = Comment::list_comment_types();
     $labels = array_map(function ($a) {
         return MultiByte::ucfirst(Plugins::filter("comment_type_display", $a, "singular"));
     }, $types);
     $terms = array_map(function ($a) {
         return "type:{$a}";
     }, $types);
     $types = array_combine($terms, $labels);
     $this->theme->special_searches = array_merge($statuses, $types);
     $this->fetch_comments();
     // Create the form for the search and manage dropbutton. I bet we can save some code when combining this with the other manage pages.
     $form = new FormUI('manage');
     //$search = FormControlFacet::create('search');
     //$form->append($search);
     $aggregate = FormControlAggregate::create('selected_items')->set_selector('.comment_checkbox')->label('None Selected');
     $form->append($aggregate);
     $page_actions = FormControlDropbutton::create('page_actions');
     $page_actions->append(FormControlSubmit::create('delete')->set_caption(_t('Delete Selected'))->set_properties(array('onclick' => 'itemManage.update(\'delete\');return false;', 'title' => _t('Delete Selected'))));
     Plugins::act('comments_manage_actions', $page_actions);
     $form->append($page_actions);
     Stack::add('admin_header_javascript', 'manage-js');
     $this->theme->form = $form;
     $this->display('comments');
 }
开发者ID:habari,项目名称:system,代码行数:40,代码来源:admincommentshandler.php


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