|
TYPO3 API
SVNRelease
|
Public Member Functions | |
| __construct ($id, $method= '', $loops=0, $step=0) | |
| __destruct () | |
| acquire () | |
| release () | |
| getMethod () | |
| getId () | |
| getResource () | |
| getLockStatus () | |
| setSyslogFacility ($syslogFacility) | |
| setEnableLogging ($isLoggingEnabled) | |
| sysLog ($message, $severity=0) | |
Protected Attributes | |
| $method | |
| $id | |
| $resource | |
| $filepointer | |
| $isAcquired = FALSE | |
| $loops = 150 | |
| $step = 200 | |
| $syslogFacility = 'cms' | |
| $isLoggingEnabled = TRUE | |
Definition at line 48 of file class.t3lib_lock.php.
| t3lib_lock::__construct | ( | $ | id, |
| $ | method = '', |
||
| $ | loops = 0, |
||
| $ | step = 0 |
||
| ) |
Constructor: initializes locking, check input parameters and set variables accordingly.
| string | ID to identify this lock in the system |
| string | Define which locking method to use. Defaults to "simple". |
| integer | Number of times a locked resource is tried to be acquired. This is only used by manual locks like the "simple" method. |
| integer | Milliseconds after lock acquire is retried. $loops * $step results in the maximum delay of a lock. Only used by manual locks like the "simple" method. |
Definition at line 71 of file class.t3lib_lock.php.
References $id, $loops, $method, $step, and t3lib_div\mkdir().
| t3lib_lock::__destruct | ( | ) |
Destructor: Releases lock automatically when instance is destroyed.
Definition at line 121 of file class.t3lib_lock.php.
References release().
| t3lib_lock::acquire | ( | ) |
Acquire a lock and return when successful. If the lock is already open, the client will be
It is important to know that the lock will be acquired in any case, even if the request was blocked first. Therefore, the lock needs to be released in every situation.
Definition at line 132 of file class.t3lib_lock.php.
References $filepointer, $isAcquired, t3lib_div\fixPermissions(), and sysLog().
| t3lib_lock::getId | ( | ) |
Return the ID which is currently used
Definition at line 250 of file class.t3lib_lock.php.
| t3lib_lock::getLockStatus | ( | ) |
Return the status of a lock
Definition at line 269 of file class.t3lib_lock.php.
Referenced by t3lib_formprotection_BackendFormProtection\releaseLock(), and tslib_fe\releasePageGenerationLock().
| t3lib_lock::getMethod | ( | ) |
Return the locking method which is currently used
Definition at line 241 of file class.t3lib_lock.php.
| t3lib_lock::getResource | ( | ) |
Return the resource which is currently used. Depending on the locking method this can be a filename or a semaphore resource.
Definition at line 260 of file class.t3lib_lock.php.
| t3lib_lock::release | ( | ) |
Release the lock
Definition at line 201 of file class.t3lib_lock.php.
Referenced by __destruct().
| t3lib_lock::setEnableLogging | ( | $ | isLoggingEnabled | ) |
Enable/ disable logging
| boolean | $isLoggingEnabled |
Definition at line 287 of file class.t3lib_lock.php.
References $isLoggingEnabled.
| t3lib_lock::setSyslogFacility | ( | $ | syslogFacility | ) |
Sets the facility (extension name) for the syslog entry.
| string | $syslogFacility |
Definition at line 278 of file class.t3lib_lock.php.
References $syslogFacility.
| t3lib_lock::sysLog | ( | $ | message, |
| $ | severity = 0 |
||
| ) |
Adds a common log entry for this locking API using t3lib_div::sysLog(). Example: 25-02-08 17:58 - cms: Locking [simple::0aeafd2a67a6bb8b9543fb9ea25ecbe2]: Acquired
| string | $message,: | The message to be logged |
| integer | $severity,: | Severity - 0 is info (default), 1 is notice, 2 is warning, 3 is error, 4 is fatal error |
Definition at line 299 of file class.t3lib_lock.php.
Referenced by acquire().
t3lib_lock::$filepointer [protected] |
Definition at line 52 of file class.t3lib_lock.php.
Referenced by acquire().
t3lib_lock::$id [protected] |
Definition at line 50 of file class.t3lib_lock.php.
Referenced by __construct().
t3lib_lock::$isAcquired = FALSE [protected] |
Definition at line 53 of file class.t3lib_lock.php.
Referenced by acquire().
t3lib_lock::$isLoggingEnabled = TRUE [protected] |
Definition at line 58 of file class.t3lib_lock.php.
Referenced by setEnableLogging().
t3lib_lock::$loops = 150 [protected] |
Definition at line 55 of file class.t3lib_lock.php.
Referenced by __construct().
t3lib_lock::$method [protected] |
Definition at line 49 of file class.t3lib_lock.php.
Referenced by __construct().
t3lib_lock::$resource [protected] |
Definition at line 51 of file class.t3lib_lock.php.
t3lib_lock::$step = 200 [protected] |
Definition at line 56 of file class.t3lib_lock.php.
Referenced by __construct().
t3lib_lock::$syslogFacility = 'cms' [protected] |
Definition at line 57 of file class.t3lib_lock.php.
Referenced by setSyslogFacility().
1.7.5.1