dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update documentation of file backend classes
[lhc/web/wiklou.git]
/
includes
/
filebackend
/
lockmanager
/
ScopedLock.php
diff --git
a/includes/filebackend/lockmanager/ScopedLock.php
b/includes/filebackend/lockmanager/ScopedLock.php
index
5faad4a
..
2056e10
100644
(file)
--- a/
includes/filebackend/lockmanager/ScopedLock.php
+++ b/
includes/filebackend/lockmanager/ScopedLock.php
@@
-34,9
+34,11
@@
class ScopedLock {
/** @var LockManager */
protected $manager;
class ScopedLock {
/** @var LockManager */
protected $manager;
+
/** @var Status */
protected $status;
/** @var Status */
protected $status;
- /** @var Array Map of lock types to resource paths */
+
+ /** @var array Map of lock types to resource paths */
protected $pathsByType;
/**
protected $pathsByType;
/**
@@
-55,14
+57,13
@@
class ScopedLock {
* Any locks are released once this object goes out of scope.
* The status object is updated with any errors or warnings.
*
* Any locks are released once this object goes out of scope.
* The status object is updated with any errors or warnings.
*
- * $type can be "mixed" and $paths can be a map of types to paths (since 1.22).
- * Otherwise $type should be an integer and $paths should be a list of paths.
- *
* @param LockManager $manager
* @param array $paths List of storage paths or map of lock types to path lists
* @param LockManager $manager
* @param array $paths List of storage paths or map of lock types to path lists
- * @param integer|string $type LockManager::LOCK_* constant or "mixed"
+ * @param int|string $type LockManager::LOCK_* constant or "mixed" and $paths
+ * can be a map of types to paths (since 1.22). Otherwise $type should be an
+ * integer and $paths should be a list of paths.
* @param Status $status
* @param Status $status
- * @param int
eger
$timeout Timeout in seconds (0 means non-blocking) (since 1.22)
+ * @param int $timeout Timeout in seconds (0 means non-blocking) (since 1.22)
* @return ScopedLock|null Returns null on failure
*/
public static function factory(
* @return ScopedLock|null Returns null on failure
*/
public static function factory(
@@
-74,6
+75,7
@@
class ScopedLock {
if ( $lockStatus->isOK() ) {
return new self( $manager, $pathsByType, $status );
}
if ( $lockStatus->isOK() ) {
return new self( $manager, $pathsByType, $status );
}
+
return null;
}
return null;
}
@@
-83,7
+85,6
@@
class ScopedLock {
* This is the same as setting the lock object to null.
*
* @param ScopedLock $lock
* This is the same as setting the lock object to null.
*
* @param ScopedLock $lock
- * @return void
* @since 1.21
*/
public static function release( ScopedLock &$lock = null ) {
* @since 1.21
*/
public static function release( ScopedLock &$lock = null ) {