2 namespace TYPO3\CMS\Core\Resource;
60 $this->identifier = $fileData[
'identifier'];
61 $this->name = $fileData[
'name'];
62 $this->properties = $fileData;
64 if (!empty($metaData)) {
65 $this->metaDataLoaded =
true;
66 $this->metaDataProperties = $metaData;
81 if (parent::hasProperty($key)) {
82 return parent::getProperty($key);
85 return isset($metaData[$key]) ? $metaData[$key] : null;
98 if (!parent::hasProperty($key)) {
112 return array_merge(parent::getProperties(), array_diff_key($this->
_getMetaData(), parent::getProperties()));
123 if (!$this->metaDataLoaded) {
139 return $this->
getStorage()->getFileContents($this);
149 if (empty($this->properties[
'sha1'])) {
150 $this->properties[
'sha1'] = parent::getSha1();
152 return $this->properties[
'sha1'];
163 $this->
getStorage()->setFileContents($this, $contents);
186 if (!$this->indexingInProgress) {
187 $this->indexingInProgress =
true;
189 $this->metaDataLoaded =
true;
190 $this->indexingInProgress =
false;
211 if (isset($properties[
'identifier'])) {
212 $this->identifier = $properties[
'identifier'];
214 if (isset($properties[
'name'])) {
215 $this->name = $properties[
'name'];
218 if ($this->properties[
'uid'] != 0 && isset($properties[
'uid'])) {
219 unset($properties[
'uid']);
221 foreach ($properties as $key => $value) {
222 if ($this->properties[$key] !== $value) {
223 if (!in_array($key, $this->updatedProperties)) {
224 $this->updatedProperties[] = $key;
226 $this->properties[$key] = $value;
230 if (array_key_exists(
'mime_type', $properties) && in_array(
'mime_type', $this->updatedProperties)) {
231 $this->updatedProperties[] =
'type';
232 unset($this->properties[
'type']);
235 if (array_key_exists(
'storage', $properties) && in_array(
'storage', $this->updatedProperties)) {
250 $this->metaDataProperties = array_merge($this->metaDataProperties, $properties);
274 return $this->
getStorage()->checkFileActionPermission($action, $this);
292 $GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'encryptionKey']
303 public function process($taskType, array $configuration)
305 return $this->
getStorage()->processFile($this, $taskType, $configuration);
326 'permissions' => array(
333 foreach ($this->properties as $key => $value) {
334 $array[$key] = $value;
336 $stat = $this->
getStorage()->getFileInfo($this);
337 foreach ($stat as $key => $value) {
338 $array[$key] = $value;
372 if ($this->
isMissing() || $this->deleted) {
375 return $this->
getStorage()->getPublicUrl($this, $relativeToCurrentScript);
401 $this->indexingInProgress = (bool)$indexingState;
411 return parent::getProperty($key);