BackendLocker

The TYPO3 Backend can be locked by creating a file named LOCK_BACKEND in a specified directory (TYPO3_CONF_VARS[BE][lockBackendFile]). The default is var/lock for composer-mode and config/ for legacy.

This class encapsulates the logic to check for the existence of the lock file, thus nobody needs to know it's a file and where to put it outside of this class. It also enables future refactoring to support other means of backend un/locking.

Table of Contents

Methods

getAbsolutePathToLockFile()  : string
getRedirectUriFromLockContents()  : string
isLocked()  : bool
lockBackend()  : void
unlock()  : void
getLockPath()  : string
Based on composer or legacy mode, return a fallback directory location where LOCK_BACKEND can be stored.

Methods

getAbsolutePathToLockFile()

public getAbsolutePathToLockFile() : string
Return values
string

getRedirectUriFromLockContents()

public getRedirectUriFromLockContents() : string
Return values
string

isLocked()

public isLocked() : bool
Return values
bool

lockBackend()

public lockBackend(string $redirectUriFromFileContent) : void
Parameters
$redirectUriFromFileContent : string

getLockPath()

Based on composer or legacy mode, return a fallback directory location where LOCK_BACKEND can be stored.

protected getLockPath() : string

Composer-mode: "var/lock" is preferred because it is recommended to be shared and persist across deployments and the location is writable by the webserver) Legacy: "config/", because usually writable by webserver and persistent.

Return values
string

        
On this page

Search results