ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilTableLock.php
Go to the documentation of this file.
1<?php
2
9{
10
14 protected $table_name = '';
18 protected $lock_sequence = false;
22 protected $alias = '';
30 protected $checked = false;
34 protected $ilDBInstance;
35
36
42 public function __construct($table_name, ilDBInterface $ilDBInterface)
43 {
44 $this->table_name = $table_name;
45 $this->ilDBInstance = $ilDBInterface;
46 }
47
48
52 public function check()
53 {
54 if (!in_array($this->getLockLevel(), array( ilAtomQuery::LOCK_READ, ilAtomQuery::LOCK_WRITE ))) {
56 }
57 if (!$this->getTableName() || !$this->ilDBInstance->tableExists($this->getTableName())) {
59 }
60
61 $this->setChecked(true);
62 }
63
64
69 public function lockSequence($lock_bool)
70 {
71 $this->setLockSequence($lock_bool);
72
73 return $this;
74 }
75
76
81 public function aliasName($alias_name)
82 {
83 $this->setAlias($alias_name);
84
85 return $this;
86 }
87
88
92 public function getTableName()
93 {
94 return $this->table_name;
95 }
96
97
101 public function setTableName($table_name)
102 {
103 $this->table_name = $table_name;
104 }
105
106
110 public function isLockSequence()
111 {
113 }
114
115
120 {
121 $this->lock_sequence = $lock_sequence;
122 }
123
124
128 public function getAlias()
129 {
130 return $this->alias;
131 }
132
133
137 public function setAlias($alias)
138 {
139 $this->alias = $alias;
140 }
141
142
146 public function getLockLevel()
147 {
148 return $this->lock_level;
149 }
150
151
155 public function setLockLevel($lock_level)
156 {
157 $this->lock_level = $lock_level;
158 }
159
160
164 public function isChecked()
165 {
166 return $this->checked;
167 }
168
169
173 public function setChecked($checked)
174 {
175 $this->checked = $checked;
176 }
177}
An exception for terminatinating execution or to throw for unit testing.
Class ilAtomQueryException.
Class ilTableLock.
aliasName($alias_name)
__construct($table_name, ilDBInterface $ilDBInterface)
ilTableLock constructor.
lockSequence($lock_bool)
setChecked($checked)
setLockSequence($lock_sequence)
setTableName($table_name)
setLockLevel($lock_level)
Interface ilDBInterface.
Class ilTableLockInterface.