AbstractHierarchicalFilesystemDriver extends AbstractDriver
Contains a few classes that might be useful for hierarchical drivers.
Table of Contents
Properties
- $capabilities : Capabilities
- The capabilities of this driver. This value should be set in the constructor of derived classes.
- $configuration : array<string|int, mixed>
- The configuration of this driver
- $storageUid : int|null
- The storage uid the driver was instantiated for
- $supportedHashAlgorithms : array<string|int, mixed>
- A list of all supported hash algorithms, written all lower case and without any dashes etc. (e.g. sha1 instead of SHA-1) Be sure to set this in inherited classes!
Methods
- __construct() : mixed
- Creates this object.
- getCapabilities() : Capabilities
- Returns the capabilities of this driver.
- getParentFolderIdentifierOfIdentifier() : non-empty-string
- Returns the identifier of the folder the file resides in.
- hasCapability() : bool
- Returns TRUE if this driver has the given capability.
- hashIdentifier() : non-empty-string
- Hashes a file identifier, taking the case sensitivity of the file system into account. This helps mitigating problems with case-insensitive databases.
- isCaseSensitiveFileSystem() : bool
- Returns TRUE if this driver uses case-sensitive identifiers. NOTE: This is a configurable setting, but the setting does not change the way the underlying file system treats the identifiers; the setting should therefore always reflect the file system and not try to change its behaviour
- setStorageUid() : void
- Sets the storage uid the driver belongs to
- canonicalizeAndCheckFileIdentifier() : string
- Makes sure the Path given as parameter is valid.
- canonicalizeAndCheckFilePath() : string
- Makes sure the given path is valid.
- canonicalizeAndCheckFolderIdentifier() : string
- Makes sure the Path given as parameter is valid.
- getTemporaryPathForFile() : string
- Returns a temporary path for a given file, including the file extension.
- isPathValid() : bool
- Wrapper for \TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr()
- isValidFilename() : bool
- Checks a fileName for validity. This could be overridden in concrete drivers if they have different file naming rules.
Properties
$capabilities
The capabilities of this driver. This value should be set in the constructor of derived classes.
protected
Capabilities
$capabilities
$configuration
The configuration of this driver
protected
array<string|int, mixed>
$configuration
= []
$storageUid
The storage uid the driver was instantiated for
protected
int|null
$storageUid
= null
$supportedHashAlgorithms
A list of all supported hash algorithms, written all lower case and without any dashes etc. (e.g. sha1 instead of SHA-1) Be sure to set this in inherited classes!
protected
array<string|int, mixed>
$supportedHashAlgorithms
= []
Tags
Methods
__construct()
Creates this object.
public
__construct([array<string|int, mixed> $configuration = [] ]) : mixed
Parameters
- $configuration : array<string|int, mixed> = []
getCapabilities()
Returns the capabilities of this driver.
public
getCapabilities() : Capabilities
Return values
CapabilitiesgetParentFolderIdentifierOfIdentifier()
Returns the identifier of the folder the file resides in.
public
getParentFolderIdentifierOfIdentifier(string $fileIdentifier) : non-empty-string
Parameters
- $fileIdentifier : string
Tags
Return values
non-empty-stringhasCapability()
Returns TRUE if this driver has the given capability.
public
hasCapability(int $capability) : bool
Parameters
- $capability : int
Tags
Return values
boolhashIdentifier()
Hashes a file identifier, taking the case sensitivity of the file system into account. This helps mitigating problems with case-insensitive databases.
public
hashIdentifier(string $identifier) : non-empty-string
Parameters
- $identifier : string
Tags
Return values
non-empty-stringisCaseSensitiveFileSystem()
Returns TRUE if this driver uses case-sensitive identifiers. NOTE: This is a configurable setting, but the setting does not change the way the underlying file system treats the identifiers; the setting should therefore always reflect the file system and not try to change its behaviour
public
isCaseSensitiveFileSystem() : bool
Return values
boolsetStorageUid()
Sets the storage uid the driver belongs to
public
setStorageUid(int $storageUid) : void
Parameters
- $storageUid : int
canonicalizeAndCheckFileIdentifier()
Makes sure the Path given as parameter is valid.
protected
canonicalizeAndCheckFileIdentifier(string $fileIdentifier) : string
Parameters
- $fileIdentifier : string
Tags
Return values
stringcanonicalizeAndCheckFilePath()
Makes sure the given path is valid.
protected
canonicalizeAndCheckFilePath(string $filePath) : string
Parameters
- $filePath : string
Tags
Return values
stringcanonicalizeAndCheckFolderIdentifier()
Makes sure the Path given as parameter is valid.
protected
canonicalizeAndCheckFolderIdentifier(string $folderIdentifier) : string
Parameters
- $folderIdentifier : string
Tags
Return values
stringgetTemporaryPathForFile()
Returns a temporary path for a given file, including the file extension.
protected
getTemporaryPathForFile(string $fileIdentifier) : string
Parameters
- $fileIdentifier : string
Tags
Return values
stringisPathValid()
Wrapper for \TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr()
protected
isPathValid(string $theFile) : bool
Parameters
- $theFile : string
Return values
bool —TRUE if no '/', '..' or '' is in the $theFile
isValidFilename()
Checks a fileName for validity. This could be overridden in concrete drivers if they have different file naming rules.
protected
isValidFilename(string $fileName) : bool
Parameters
- $fileName : string