FilePersistenceSlot implements SingletonInterface

FinalYes

A PSR-14 event listener for various FAL related functionality.

Internal

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 $contentSignature = null ]) : bool
Parameters
$command : string
$combinedFileIdentifier : string
$contentSignature : string = null
Tags
see
getContentSignature
Return values
bool

defineInvocation()

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
string

assertFileName()

protected assertFileName(string $command, string $combinedFileIdentifier[, string $content = null ]) : void
Parameters
$command : string
$combinedFileIdentifier : string
$content : string = null
Tags
throws
FormDefinitionPersistenceException

isFormDefinition()

protected isFormDefinition(string $identifier) : bool
Parameters
$identifier : string
Return values
bool

searchAllowedInvocation()

protected searchAllowedInvocation(string $command, string $combinedFileIdentifier[, string|null $contentSignature = null ]) : int|null
Parameters
$command : string
$combinedFileIdentifier : string
$contentSignature : string|null = null
Return values
int|null

        
On this page

Search results