NullLockHandler.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
12 
16 
17 /**
18  * NullLockHandler acts as if no LockHandler was installed.
19  * Use this to disable locking.
20  *
21  * @author ingo herwig <ingo@wemove.com>
22  */
23 class NullLockHandler implements LockHandler {
24 
25  /**
26  * @see LockHandler::aquireLock()
27  */
28  public function aquireLock(ObjectId $oid, $type, PersistentObject $currentState=null) {}
29 
30  /**
31  * @see LockHandler::releaseLock()
32  */
33  public function releaseLock(ObjectId $oid, $type=null) {}
34 
35  /**
36  * @see LockHandler::releaseLocks()
37  */
38  public function releaseLocks(ObjectId $oid) {}
39 
40  /**
41  * @see LockHandler::releaseAllLocks()
42  */
43  public function releaseAllLocks() {}
44 
45  /**
46  * @see LockHandler::getLocks()
47  */
48  public function getLock(ObjectId $oid) {
49  return null;
50  }
51 
52  /**
53  * @see LockHandler::updateLock()
54  */
55  public function updateLock(ObjectId $oid, PersistentObject $object) {}
56 }
57 ?>
aquireLock(ObjectId $oid, $type, PersistentObject $currentState=null)
updateLock(ObjectId $oid, PersistentObject $object)
NullLockHandler acts as if no LockHandler was installed.
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
LockHandler defines the interface for LockHandler implementations.
Definition: LockHandler.php:21
PersistentObject defines the interface of all persistent objects.