ILIAS  release_7 Revision v7.30-3-g800a261c036
LockHandlerilDB.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
10{
14 protected $db;
15
21 public function __construct(\ilDBInterface $db)
22 {
23 $this->db = $db;
24 }
25
26 public function lockTables(array $table_names, callable $during) : 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 }
38}
An exception for terminatinating execution or to throw for unit testing.
__construct(\ilDBInterface $db)
LockHandlerilDB constructor.
lockTables(array $table_names, callable $during)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...