FilePersistenceSlot implements SingletonInterface
FinalYes
A PSR-14 event listener for various FAL related functionality.
will be renamed at some point.
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Constants
- COMMAND_FILE_ADD = 'fileAdd'
- COMMAND_FILE_CREATE = 'fileCreate'
- COMMAND_FILE_MOVE = 'fileMove'
- COMMAND_FILE_RENAME = 'fileRename'
- COMMAND_FILE_REPLACE = 'fileReplace'
- COMMAND_FILE_SET_CONTENTS = 'fileSetContents'
Properties
- $allowedInvocations : array<string|int, mixed>
- $definedInvocations : array<string|int, mixed>
Methods
- allowInvocation() : bool
- Allows invocation for a particular combination of command and file identifier. Commands providing new content have have to submit a HMAC signature on the content as well.
- defineInvocation() : mixed
- Defines invocations on command level only depending on the type:
- getContentSignature() : string
- onPreFileAdd() : void
- onPreFileCreate() : void
- onPreFileMove() : void
- onPreFileRename() : void
- onPreFileReplace() : void
- onPreFileSetContents() : void
- assertFileName() : void
- buildCombinedIdentifier() : string
- isFormDefinition() : bool
- isRecycleFolder() : bool
- searchAllowedInvocation() : int|null
Constants
COMMAND_FILE_ADD
public
mixed
COMMAND_FILE_ADD
= 'fileAdd'
COMMAND_FILE_CREATE
public
mixed
COMMAND_FILE_CREATE
= 'fileCreate'
COMMAND_FILE_MOVE
public
mixed
COMMAND_FILE_MOVE
= 'fileMove'
COMMAND_FILE_RENAME
public
mixed
COMMAND_FILE_RENAME
= 'fileRename'
COMMAND_FILE_REPLACE
public
mixed
COMMAND_FILE_REPLACE
= 'fileReplace'
COMMAND_FILE_SET_CONTENTS
public
mixed
COMMAND_FILE_SET_CONTENTS
= 'fileSetContents'
Properties
$allowedInvocations
protected
array<string|int, mixed>
$allowedInvocations
= []
$definedInvocations
protected
array<string|int, mixed>
$definedInvocations
= []
Methods
allowInvocation()
Allows invocation for a particular combination of command and file identifier. Commands providing new content have have to submit a HMAC signature on the content as well.
public
allowInvocation(string $command, string $combinedFileIdentifier[, string|null $contentSignature = null ]) : bool
Parameters
- $command : string
- $combinedFileIdentifier : string
- $contentSignature : string|null = null
Tags
Return values
booldefineInvocation()
Defines invocations on command level only depending on the type:
public
defineInvocation(string $command[, bool|null $type = null ]) : mixed
- true: whitelist command, takes precedence over $allowedInvocations
- false: blacklist command, takes precedence over $allowedInvocations
- removes previously definition for particular command
Parameters
- $command : string
- $type : bool|null = null
getContentSignature()
public
getContentSignature(string $content) : string
Parameters
- $content : string
Return values
stringonPreFileAdd()
public
onPreFileAdd(BeforeFileAddedEvent $event) : void
Parameters
- $event : BeforeFileAddedEvent
onPreFileCreate()
public
onPreFileCreate(BeforeFileCreatedEvent $event) : void
Parameters
- $event : BeforeFileCreatedEvent
onPreFileMove()
public
onPreFileMove(BeforeFileMovedEvent $event) : void
Parameters
- $event : BeforeFileMovedEvent
onPreFileRename()
public
onPreFileRename(BeforeFileRenamedEvent $event) : void
Parameters
- $event : BeforeFileRenamedEvent
onPreFileReplace()
public
onPreFileReplace(BeforeFileReplacedEvent $event) : void
Parameters
- $event : BeforeFileReplacedEvent
onPreFileSetContents()
public
onPreFileSetContents(BeforeFileContentsSetEvent $event) : void
Parameters
- $event : BeforeFileContentsSetEvent
assertFileName()
protected
assertFileName(string $command, string $combinedFileIdentifier[, string|null $content = null ]) : void
Parameters
- $command : string
- $combinedFileIdentifier : string
- $content : string|null = null
Tags
buildCombinedIdentifier()
protected
buildCombinedIdentifier(FolderInterface $folder, string $fileName) : string
Parameters
- $folder : FolderInterface
- $fileName : string
Return values
stringisFormDefinition()
protected
isFormDefinition(string $identifier) : bool
Parameters
- $identifier : string
Return values
boolisRecycleFolder()
protected
isRecycleFolder(FolderInterface $folder) : bool
Parameters
- $folder : FolderInterface
Return values
boolsearchAllowedInvocation()
protected
searchAllowedInvocation(string $command, string $combinedFileIdentifier[, string|null $contentSignature = null ]) : int|null
Parameters
- $command : string
- $combinedFileIdentifier : string
- $contentSignature : string|null = null