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


PHP ParseObject::getUpdatedAt方法代碼示例

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


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

示例1: getABeacon

function getABeacon(ParseObject $object)
{
    $beacon = new stdClass();
    $beacon->objectId = $object->getObjectId();
    $beacon->uuid = $object->get('UUID');
    $beacon->beaconColor = $object->get('beaconColor');
    if (count($object->getRelation("brand")->getQuery()->find()) != 0) {
        $beaconBrand = $object->getRelation("brand")->getQuery()->find();
        $beacon->brand = getABrand($beaconBrand[0]);
    } else {
        $beacon->brand = null;
    }
    $beacon->major = $object->get('major');
    $beacon->minor = $object->get('minor');
    $beacon->name = $object->get('name');
    if ($object->get('region') != null) {
        $beaconRegion = $object->get('region')->fetch();
        $beacon->region = getARegion($beaconRegion);
    } else {
        $beacon->region = null;
    }
    $beacon->type = $object->get('type');
    $beacon->createdAt = $object->getCreatedAt();
    $beacon->upadtedAt = $object->getUpdatedAt();
    return $beacon;
}
開發者ID:azimjs,項目名稱:chartswell-admin,代碼行數:26,代碼來源:global.php

示例2: mergeFromObject

 /**
  * Merge data from other object.
  *
  * @param ParseObject $other
  */
 private function mergeFromObject($other)
 {
     if (!$other) {
         return;
     }
     $this->objectId = $other->getObjectId();
     $this->createdAt = $other->getCreatedAt();
     $this->updatedAt = $other->getUpdatedAt();
     $this->serverData = $other->serverData;
     $this->operationSet = [];
     $this->hasBeenFetched = true;
     $this->rebuildEstimatedData();
 }
開發者ID:bohemima,項目名稱:parse-php-sdk,代碼行數:18,代碼來源:ParseObject.php

示例3: parseObjectToArray

 /**
  * @return array
  */
 public function parseObjectToArray(ParseObject $object)
 {
     $array = $object->getAllKeys();
     $array['objectId'] = $object->getObjectId();
     $createdAt = $object->getCreatedAt();
     if ($createdAt) {
         $array['createdAt'] = $this->dateToString($createdAt);
     }
     $updatedAt = $object->getUpdatedAt();
     if ($updatedAt) {
         $array['updatedAt'] = $this->dateToString($updatedAt);
     }
     if ($object->getACL()) {
         $array['ACL'] = $object->getACL()->_encode();
     }
     foreach ($array as $key => $value) {
         if ($value instanceof ParseObject) {
             if ($value->getClassName() == $this->parseObject->getClassName() && $value->getObjectId() == $this->parseObject->getObjectId()) {
                 // If a key points to this parent object, we will skip it to avoid
                 // infinite recursion.
             } elseif ($value->isDataAvailable()) {
                 $array[$key] = $this->parseObjectToArray($value);
             }
         } elseif ($value instanceof ParseFile) {
             $array[$key] = $value->_encode();
         }
     }
     return $array;
 }
開發者ID:parziphal,項目名稱:parse,代碼行數:32,代碼來源:ObjectModel.php


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