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


PHP File::getProperties方法代码示例

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


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

示例1: getProperties

 /**
  * Gets all properties, falling back to values of the parent.
  *
  * @return array
  */
 public function getProperties()
 {
     if (empty($this->mergedProperties)) {
         $this->mergedProperties = $this->propertiesOfFileReference;
         ArrayUtility::mergeRecursiveWithOverrule($this->mergedProperties, $this->originalFile->getProperties(), true, true, false);
         array_walk($this->mergedProperties, [$this, 'restoreNonNullValuesCallback']);
     }
     return $this->mergedProperties;
 }
开发者ID:,项目名称:,代码行数:14,代码来源:

示例2: getFileArray

 /**
  * Fixes a bug in TYPO3 6.2.0 that the properties metadata is not overlayed on localization.
  *
  * @param File $file
  * @return array
  */
 public static function getFileArray(File $file)
 {
     $properties = $file->getProperties();
     $stat = $file->getStorage()->getFileInfo($file);
     $array = $file->toArray();
     foreach ($properties as $key => $value) {
         $array[$key] = $value;
     }
     foreach ($stat as $key => $value) {
         $array[$key] = $value;
     }
     return $array;
 }
开发者ID:smichaelsen,项目名称:vhs,代码行数:19,代码来源:ResourceUtility.php

示例3: toArray

 /**
  * Basic array function for the DB update
  *
  * @return array
  */
 public function toArray()
 {
     if ($this->usesOriginalFile()) {
         $properties = $this->originalFile->getProperties();
         unset($properties['uid']);
         unset($properties['pid']);
         unset($properties['identifier']);
         unset($properties['name']);
         // Use width + height set in processed file
         $properties['width'] = $this->properties['width'];
         $properties['height'] = $this->properties['height'];
     } else {
         $properties = $this->properties;
         $properties['identifier'] = $this->getIdentifier();
         $properties['name'] = $this->getName();
     }
     $properties['configuration'] = serialize($this->processingConfiguration);
     return array_merge($properties, array('storage' => $this->getStorage()->getUid(), 'checksum' => $this->calculateChecksum(), 'task_type' => $this->taskType, 'configurationsha1' => sha1($properties['configuration']), 'original' => $this->originalFile->getUid(), 'originalfilesha1' => $this->originalFileSha1));
 }
开发者ID:TYPO3Incubator,项目名称:TYPO3.CMS,代码行数:24,代码来源:ProcessedFile.php

示例4: update

 /**
  * Updates an existing file object in the database
  *
  * @param \TYPO3\CMS\Core\Resource\File $modifiedObject
  * @return void
  */
 public function update($modifiedObject)
 {
     // TODO check if $modifiedObject is an instance of \TYPO3\CMS\Core\Resource\File
     // TODO check if $modifiedObject is indexed
     $changedProperties = $modifiedObject->getUpdatedProperties();
     $properties = $modifiedObject->getProperties();
     $updateFields = array();
     foreach ($changedProperties as $propertyName) {
         $updateFields[$propertyName] = $properties[$propertyName];
     }
     $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_file', 'uid=' . $modifiedObject->getUid(), $updateFields);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:18,代码来源:FileRepository.php

示例5: getReferenceProperties

 /**
  * Gets all properties.
  *
  * @return array
  */
 public function getReferenceProperties()
 {
     return \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($this->originalFile->getProperties(), $this->propertiesOfFileReference);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:9,代码来源:FileReference.php


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