当前位置: 首页>>代码示例>>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;未经允许,请勿转载。