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


PHP record_adapter::getSha256方法代碼示例

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


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

示例1: mirror

 /**
  * @param record_adapter $record
  */
 private function mirror(record_adapter $record)
 {
     $this->mime = $record->getMimeType();
     $this->sha256 = $record->getSha256();
     $this->original_name = $record->getOriginalName();
     $this->type = $record->getType();
     $this->isStory = $record->isStory();
     $this->uuid = $record->getUuid();
     $this->updated = $record->getUpdated();
     $this->created = $record->getCreated();
     $this->base_id = $record->getBaseId();
     $this->collection_id = $record->getCollectionId();
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:16,代碼來源:adapter.php

示例2: listRecord

 /**
  * Retrieve detailed information about one record
  *
  * @param Request          $request
  * @param \record_adapter $record
  * @return array
  */
 public function listRecord(Request $request, \record_adapter $record)
 {
     $technicalInformation = [];
     foreach ($record->get_technical_infos()->getValues() as $name => $value) {
         $technicalInformation[] = ['name' => $name, 'value' => $value];
     }
     $data = ['databox_id' => $record->getDataboxId(), 'record_id' => $record->getRecordId(), 'mime_type' => $record->getMimeType(), 'title' => $record->get_title(), 'original_name' => $record->get_original_name(), 'updated_on' => $record->getUpdated()->format(DATE_ATOM), 'created_on' => $record->getCreated()->format(DATE_ATOM), 'collection_id' => $record->getCollectionId(), 'base_id' => $record->getBaseId(), 'sha256' => $record->getSha256(), 'thumbnail' => $this->listEmbeddableMedia($request, $record, $record->get_thumbnail()), 'technical_informations' => $technicalInformation, 'phrasea_type' => $record->getType(), 'uuid' => $record->getUuid()];
     if ($request->attributes->get('_extended', false)) {
         $subdefs = $caption = [];
         foreach ($record->get_embedable_medias([], []) as $name => $media) {
             if (null !== ($subdef = $this->listEmbeddableMedia($request, $record, $media))) {
                 $subdefs[] = $subdef;
             }
         }
         foreach ($record->get_caption()->get_fields() as $field) {
             $caption[] = ['meta_structure_id' => $field->get_meta_struct_id(), 'name' => $field->get_name(), 'value' => $field->get_serialized_values(';')];
         }
         $extendedData = ['subdefs' => $subdefs, 'metadata' => $this->listRecordCaption($record->get_caption()), 'status' => $this->listRecordStatus($record), 'caption' => $caption];
         $data = array_merge($data, $extendedData);
     }
     return $data;
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:29,代碼來源:V1Controller.php


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