當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。