TYPO3
7.6
|
Protected Member Functions | |
loadMetaData () | |
getMetaDataRepository () | |
getFileIndexRepository () | |
Protected Attributes | |
$metaDataLoaded = false | |
$metaDataProperties = array() | |
$indexingInProgress = false | |
$updatedProperties = array() | |
Protected Attributes inherited from AbstractFile | |
$properties | |
$storage = null | |
$identifier | |
$name | |
$deleted = false | |
Additional Inherited Members | |
Public Attributes inherited from AbstractFile | |
const | FILETYPE_UNKNOWN = 0 |
const | FILETYPE_TEXT = 1 |
const | FILETYPE_IMAGE = 2 |
const | FILETYPE_AUDIO = 3 |
const | FILETYPE_VIDEO = 4 |
const | FILETYPE_APPLICATION = 5 |
File representation in the file abstraction layer.
Definition at line 23 of file core/Classes/Resource/File.php.
__construct | ( | array | $fileData, |
ResourceStorage | $storage, | ||
array | $metaData = array() |
||
) |
Constructor for a file object. Should normally not be used directly, use the corresponding factory methods instead.
array | $fileData | |
ResourceStorage | $storage | |
array | $metaData |
Definition at line 58 of file core/Classes/Resource/File.php.
References AbstractFile\$storage.
_getMetaData | ( | ) |
Returns the MetaData
Definition at line 121 of file core/Classes/Resource/File.php.
References File\$metaDataProperties, and File\loadMetaData().
Referenced by FileDeletionAspect\cleanupCategoryReferences(), Indexer\extractMetaData(), File\getProperties(), File\getProperty(), File\hasProperty(), and FileList\linkWrapFile().
_getPropertyRaw | ( | $key | ) |
$key |
Definition at line 409 of file core/Classes/Resource/File.php.
Referenced by FileIndexRepository\add(), and FileIndexRepository\getWhereClauseForFile().
_updateMetaDataProperties | ( | array | $properties | ) |
Updates MetaData properties
Definition at line 248 of file core/Classes/Resource/File.php.
Referenced by Indexer\extractMetaData(), and Indexer\extractRequiredMetaData().
calculateChecksum | ( | ) |
Creates a MD5 hash checksum based on the combined identifier of the file, the files' mimetype and the systems' encryption key. used to generate a thumbnail, and this hash is checked if valid
Definition at line 287 of file core/Classes/Resource/File.php.
References $GLOBALS, AbstractFile\getCombinedIdentifier(), and AbstractFile\getMimeType().
Referenced by File\toArray().
checkActionPermission | ( | $action | ) |
Check if a file operation (= action) is allowed for this file
string | $action,can | be read, write, delete |
Definition at line 272 of file core/Classes/Resource/File.php.
References AbstractFile\getStorage().
Referenced by FileList\linkWrapFile(), FileList\makeEdit(), and File\toArray().
getContents | ( | ) |
Get the contents of this file
Implements FileInterface.
Definition at line 137 of file core/Classes/Resource/File.php.
References AbstractFile\getStorage().
Referenced by AbstractOnlineMediaHelper\getOnlineMediaId().
|
protected |
Definition at line 390 of file core/Classes/Resource/File.php.
References GeneralUtility\makeInstance().
|
protected |
Definition at line 382 of file core/Classes/Resource/File.php.
References GeneralUtility\makeInstance().
Referenced by File\loadMetaData().
getProperties | ( | ) |
Returns the properties of this object.
Definition at line 110 of file core/Classes/Resource/File.php.
References File\_getMetaData().
Referenced by FileIndexRepository\add(), and FileIndexRepository\update().
getProperty | ( | $key | ) |
Returns a property value
string | $key |
Implements FileInterface.
Definition at line 79 of file core/Classes/Resource/File.php.
References File\_getMetaData().
Referenced by AbstractOEmbedHelper\getMetaData(), SelectImage\insertPlainImage(), File\isMissing(), and FileIndexRepository\update().
getPublicUrl | ( | $relativeToCurrentScript = false | ) |
Returns a publicly accessible URL for this file When file is marked as missing or deleted no url is returned
WARNING: Access to the file may be restricted by further means, e.g. some web-based authentication. You have to take care of this yourself.
bool | $relativeToCurrentScript | Determines whether the URL returned should be relative to the current script, in case it is relative at all (only for the LocalDriver) |
Implements FileInterface.
Definition at line 370 of file core/Classes/Resource/File.php.
References AbstractFile\getStorage(), and File\isMissing().
Referenced by SelectImage\insertPlainImage(), and File\toArray().
getSha1 | ( | ) |
Gets SHA1 hash.
Implements FileInterface.
Definition at line 147 of file core/Classes/Resource/File.php.
getUpdatedProperties | ( | ) |
Returns the names of all properties that have been updated in this record
Definition at line 258 of file core/Classes/Resource/File.php.
References File\$updatedProperties.
Referenced by FileIndexRepository\update().
hasProperty | ( | $key | ) |
Checks if the file has a (metadata) property which can be retrieved by "getProperty"
string | $key |
Implements FileInterface.
Definition at line 96 of file core/Classes/Resource/File.php.
References File\_getMetaData().
isIndexed | ( | ) |
Returns TRUE if this file is indexed
Implements FileInterface.
Definition at line 175 of file core/Classes/Resource/File.php.
Referenced by FileList\linkWrapFile().
isMissing | ( | ) |
Definition at line 346 of file core/Classes/Resource/File.php.
References File\getProperty().
Referenced by File\getPublicUrl().
|
protected |
Loads MetaData from Repository
Definition at line 184 of file core/Classes/Resource/File.php.
References File\getMetaDataRepository().
Referenced by File\_getMetaData().
process | ( | $taskType, | |
array | $configuration | ||
) |
Returns a modified version of the file.
string | $taskType | The task type of this processing |
array | $configuration | the processing configuration, see manual for that |
Definition at line 303 of file core/Classes/Resource/File.php.
References AbstractFile\getStorage().
Referenced by ImageManipulationElement\getPreview().
setContents | ( | $contents | ) |
Replace the current file contents with the given string
string | $contents | The contents to write to the file. |
Implements FileInterface.
Definition at line 161 of file core/Classes/Resource/File.php.
References AbstractFile\getStorage().
setIndexingInProgess | ( | $indexingState | ) |
Definition at line 399 of file core/Classes/Resource/File.php.
setMissing | ( | $missing | ) |
bool | $missing |
Definition at line 354 of file core/Classes/Resource/File.php.
References File\updateProperties().
toArray | ( | ) |
Returns an array representation of the file. (This is used by the generic listing module vidi when displaying file records.)
Implements FileInterface.
Definition at line 314 of file core/Classes/Resource/File.php.
References File\calculateChecksum(), File\checkActionPermission(), AbstractFile\getCombinedIdentifier(), AbstractFile\getExtension(), AbstractFile\getMimeType(), AbstractFile\getName(), File\getPublicUrl(), AbstractFile\getSize(), AbstractFile\getStorage(), AbstractFile\getType(), and AbstractFile\getUid().
updateProperties | ( | array | $properties | ) |
Updates the properties of this file, e.g. after re-indexing or moving it. By default, only properties that exist as a key in the $properties array are overwritten. If you want to explicitly unset a property, set the corresponding key to NULL in the array.
NOTE: This method should not be called from outside the File Abstraction Layer (FAL)!
array | $properties |
Definition at line 206 of file core/Classes/Resource/File.php.
References ResourceFactory\getInstance(), and AbstractFile\getType().
Referenced by FileIndexRepository\add(), File\setMissing(), and Indexer\updateIndexEntry().
|
protected |
Definition at line 40 of file core/Classes/Resource/File.php.
|
protected |
Definition at line 28 of file core/Classes/Resource/File.php.
|
protected |
Definition at line 33 of file core/Classes/Resource/File.php.
Referenced by File\_getMetaData().
|
protected |
Definition at line 48 of file core/Classes/Resource/File.php.
Referenced by File\getUpdatedProperties().