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


PHP Timestamp::getAllHours方法代码示例

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


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

示例1: render

 function render()
 {
     // fetch the categories
     $categories = new ArticleCategories();
     $blogSettings = $this->_blogInfo->getSettings();
     $categoriesOrder = $blogSettings->getValue("categories_order");
     $blogCategories = $categories->getBlogCategories($this->_blogInfo->getId(), false, $categoriesOrder);
     // get some stuff for the time stamp of the post, which is changeable now
     //$t = new Timestamp();
     $t = Timestamp::getBlogDate($this->_blogInfo);
     //$t->toUTC();
     //
     // changes to make plog store its dates with the time difference already
     // applied, instead of applying it dynamically
     //
     $config =& Config::getConfig();
     /*if( $config->getValue( "time_difference_calculation" == TIME_DIFFERENCE_CALCULATION_STATIC ) {
     		$blogSettings = $this->_blogInfo->getSettings();
     		$difference = $blogSettings->getValue( "time_offset" );
               	$t->setDate( Timestamp::getDateWithOffset( $t->getDate(), $difference ), DATE_FORMAT_TIMESTAMP );
           	}*/
     // fetch the custom fields, if any, but not including the ones that have been set to "hidden"...
     $customFields = new CustomFields();
     $blogFields = $customFields->getBlogCustomFields($this->_blogInfo->getId(), false);
     // and put everything in the template
     $locale = $this->_blogInfo->getLocale();
     $this->setValue("commentsEnabled", $blogSettings->getValue("comments_enabled"));
     $this->setValue("categories", $blogCategories);
     $this->setValue("today", $t);
     $this->setValue("months", $locale->getMonthNames());
     $this->setValue("days", $locale->getDayNamesShort());
     $this->setValue("years", Timestamp::getYears());
     $this->setValue("hours", Timestamp::getAllHours());
     $this->setValue("minutes", Timestamp::getAllMinutes());
     $this->setValue("customfields", $blogFields);
     $this->setValue("poststatus", ArticleStatus::getStatusList());
     $this->setValue("sendPings", $config->getValue("send_xmlrpc_pings_enabled_by_default", true));
     $this->setValue("xmlRpcPingEnabled", $config->getValue("xmlrpc_ping_enabled", false));
     $this->setValue("autoSaveNewDraftsTimeMillis", $config->getValue("autosave_new_drafts_time_millis"));
     $this->setValue("xmlHttpRequestSupportEnabled", $config->getValue("save_drafts_via_xmlhttprequest_enabled"));
     $this->setValue("postDateTime", $t->getDay() . "/" . $t->getMonth() . "/" . $t->getYear() . " " . $t->getHour() . ":" . $t->getMinutes());
     parent::render();
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:43,代码来源:adminnewpostview.class.php


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