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


PHP TimeDate::copy方法代碼示例

本文整理匯總了PHP中TimeDate::copy方法的典型用法代碼示例。如果您正苦於以下問題:PHP TimeDate::copy方法的具體用法?PHP TimeDate::copy怎麽用?PHP TimeDate::copy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TimeDate的用法示例。


在下文中一共展示了TimeDate::copy方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: staleInfo

 /**
  * Checks if the last update is older than or equal to the update interval
  * @return bool Whether the information is older than the update interval
  */
 public function staleInfo()
 {
     $update_time = $this->updated->copy();
     $update_time->modify(Service::getParameter('bzion.miscellaneous.update_interval'));
     return TimeDate::now() >= $update_time;
 }
開發者ID:kleitz,項目名稱:bzion,代碼行數:10,代碼來源:Server.php

示例2: getLastActivity

 /**
  * Get the time when the conversation was most recently active
  *
  * @return TimeDate
  */
 public function getLastActivity()
 {
     return $this->last_activity->copy();
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:9,代碼來源:Conversation.php

示例3: getUpdated

 /**
  * Get the timestamp of the last update of the match
  *
  * @return TimeDate The match's update timestamp
  */
 public function getUpdated()
 {
     return $this->updated->copy();
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:9,代碼來源:Match.php

示例4: getCreationDate

 /**
  * Get the creation date of the team
  *
  * @return TimeDate The creation date of the team
  */
 public function getCreationDate()
 {
     return $this->created->copy();
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:9,代碼來源:Team.php

示例5: getExpiration

 /**
  * Get the time when the invitation will expire
  *
  * @return TimeDate
  */
 public function getExpiration()
 {
     return $this->expiration->copy();
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:9,代碼來源:Invitation.php

示例6: hasBeenActive

 /**
  * Check whether or not a player been in a match or has logged on in the specified amount of time to be considered
  * active
  *
  * @return bool True if the player has been active
  */
 public function hasBeenActive()
 {
     $this->lazyLoad();
     $interval = Service::getParameter('bzion.miscellaneous.active_interval');
     $lastLogin = $this->last_login->copy()->modify($interval);
     $hasBeenActive = TimeDate::now() <= $lastLogin;
     if ($this->last_match->isValid()) {
         $lastMatch = $this->last_match->getTimestamp()->copy()->modify($interval);
         $hasBeenActive = $hasBeenActive || TimeDate::now() <= $lastMatch;
     }
     return $hasBeenActive;
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:18,代碼來源:Player.php

示例7: getTimestamp

 /**
  * Get a copy of the timestamp of the Model
  *
  * @return \TimeDate
  */
 public function getTimestamp()
 {
     return $this->timestamp->copy();
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:9,代碼來源:Timestamp.php

示例8: getLastEdit

 /**
  * Get the time when the article was last updated
  *
  * @return TimeDate The article's last update time
  */
 public function getLastEdit()
 {
     return $this->updated->copy();
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:9,代碼來源:News.php

示例9: getUpdated

 /**
  * Get the time when the page was last updated
  * @return TimeDate
  */
 public function getUpdated()
 {
     $this->lazyLoad();
     return $this->updated->copy();
 }
開發者ID:allejo,項目名稱:bzion,代碼行數:9,代碼來源:Page.php


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