/**
  * @see FileBackend::getFileProps()
  * @return Array
  */
 public final function getFileProps(array $params)
 {
     wfProfileIn(__METHOD__);
     wfProfileIn(__METHOD__ . '-' . $this->name);
     $fsFile = $this->getLocalReference($params);
     $props = $fsFile ? $fsFile->getProps() : FSFile::placeholderProps();
     wfProfileOut(__METHOD__ . '-' . $this->name);
     wfProfileOut(__METHOD__);
     return $props;
 }
 public final function getFileProps(array $params)
 {
     $ps = $this->scopedProfileSection(__METHOD__ . "-{$this->name}");
     $fsFile = $this->getLocalReference($params);
     $props = $fsFile ? $fsFile->getProps() : FSFile::placeholderProps();
     return $props;
 }
Exemple #3
0
 /**
  * Empty place holder props for non-existing files
  *
  * Resulting array fields include:
  *   - fileExists
  *   - size (filesize in bytes)
  *   - mime (as major/minor)
  *   - media_type (value to be used with the MEDIATYPE_xxx constants)
  *   - metadata (handler specific)
  *   - sha1 (in base 36)
  *   - width
  *   - height
  *   - bits (bitrate)
  *   - file-mime
  *   - major_mime
  *   - minor_mime
  *
  * @return array
  * @since 1.28
  */
 public function newPlaceholderProps()
 {
     return FSFile::placeholderProps() + ['metadata' => '', 'width' => 0, 'height' => 0, 'bits' => 0, 'media_type' => MEDIATYPE_UNKNOWN];
 }