MediaWiki  REL1_19
ScopedLock Class Reference

Self releasing locks. More...

List of all members.

Public Member Functions

 __destruct ()

Static Public Member Functions

static factory (LockManager $manager, array $paths, $type, Status $status)
 Get a ScopedLock object representing a lock on resource paths.

Protected Member Functions

 __clone ()
 __construct (LockManager $manager, array $paths, $type, Status $status)

Protected Attributes

 $manager
 $paths
 $status
 $type

Detailed Description

Self releasing locks.

LockManager helper class to handle scoped locks, which release when an object is destroyed or goes out of scope.

Since:
1.19

Definition at line 111 of file LockManager.php.


Constructor & Destructor Documentation

ScopedLock::__construct ( LockManager manager,
array $  paths,
type,
Status status 
) [protected]
Parameters:
$managerLockManager
$pathsArray List of storage paths
$typeinteger LockManager::LOCK_* constant
$statusStatus

Definition at line 127 of file LockManager.php.

References $manager, $paths, $status, and $type.

Definition at line 160 of file LockManager.php.


Member Function Documentation

ScopedLock::__clone ( ) [protected]

Definition at line 136 of file LockManager.php.

static ScopedLock::factory ( LockManager manager,
array $  paths,
type,
Status status 
) [static]

Get a ScopedLock object representing a lock on resource paths.

Any locks are released once this object goes out of scope. The status object is updated with any errors or warnings.

Parameters:
$managerLockManager
$pathsArray List of storage paths
$typeinteger LockManager::LOCK_* constant
$statusStatus
Returns:
ScopedLock|null Returns null on failure

Definition at line 149 of file LockManager.php.

References $manager, $paths, $status, $type, LockManager\lock(), and Status\merge().

Referenced by FileBackend\getScopedFileLocks().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

ScopedLock::$manager [protected]

Definition at line 113 of file LockManager.php.

Referenced by __construct(), and factory().

ScopedLock::$paths [protected]

Definition at line 117 of file LockManager.php.

Referenced by __construct(), and factory().

ScopedLock::$status [protected]

Definition at line 115 of file LockManager.php.

Referenced by __construct(), and factory().

ScopedLock::$type [protected]

Definition at line 119 of file LockManager.php.

Referenced by __construct(), and factory().


The documentation for this class was generated from the following file: