ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\ResourceStorage\Lock\LockHandlerilDB Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\Lock\LockHandlerilDB:
+ Collaboration diagram for ILIAS\ResourceStorage\Lock\LockHandlerilDB:

Public Member Functions

 __construct (\ilDBInterface $db)
 LockHandlerilDB constructor. More...
 
 lockTables (array $table_names, callable $during)
 

Protected Attributes

 $db
 

Detailed Description

Definition at line 9 of file LockHandlerilDB.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Lock\LockHandlerilDB::__construct ( \ilDBInterface  $db)

LockHandlerilDB constructor.

Parameters
\ilDBInterface$db

Definition at line 21 of file LockHandlerilDB.php.

References ILIAS\ResourceStorage\Lock\LockHandlerilDB\$db.

22  {
23  $this->db = $db;
24  }

Member Function Documentation

◆ lockTables()

ILIAS\ResourceStorage\Lock\LockHandlerilDB::lockTables ( array  $table_names,
callable  $during 
)

Implements ILIAS\ResourceStorage\Lock\LockHandler.

Definition at line 26 of file LockHandlerilDB.php.

References ILIAS\ResourceStorage\Lock\LockHandlerilDB\$db.

26  : LockHandlerResult
27  {
28  $lock = $this->db->buildAtomQuery();
29  foreach ($table_names as $table_name) {
30  $lock->addTableLock($table_name);
31  }
32  $lock->addQueryCallable(static function (\ilDBInterface $db) use ($during) {
33  $during();
34  });
35 
36  return new LockHandlerResultilDB($lock);
37  }

Field Documentation

◆ $db

ILIAS\ResourceStorage\Lock\LockHandlerilDB::$db
protected

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