ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTableLock Class Reference

Class ilTableLock. More...

+ Inheritance diagram for ilTableLock:
+ Collaboration diagram for ilTableLock:

Public Member Functions

 __construct ($table_name, ilDBInterface $ilDBInterface)
 ilTableLock constructor. More...
 
 check ()
 
 lockSequence ($lock_bool)
 
 aliasName ($alias_name)
 
 getTableName ()
 
 setTableName ($table_name)
 
 isLockSequence ()
 
 setLockSequence ($lock_sequence)
 
 getAlias ()
 
 setAlias ($alias)
 
 getLockLevel ()
 
 setLockLevel ($lock_level)
 
 isChecked ()
 
 setChecked ($checked)
 

Protected Attributes

 $table_name = ''
 
 $lock_sequence = false
 
 $alias = ''
 
 $lock_level = ilAtomQuery::LOCK_WRITE
 
 $checked = false
 
 $ilDBInstance
 

Detailed Description

Class ilTableLock.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 9 of file class.ilTableLock.php.

Constructor & Destructor Documentation

◆ __construct()

ilTableLock::__construct (   $table_name,
ilDBInterface  $ilDBInterface 
)

ilTableLock constructor.

Parameters
string$table_name

Definition at line 43 of file class.ilTableLock.php.

References $table_name.

44  {
45  $this->table_name = $table_name;
46  $this->ilDBInstance = $ilDBInterface;
47  }

Member Function Documentation

◆ aliasName()

ilTableLock::aliasName (   $alias_name)
Parameters
$alias_name
Returns
$this

Implements ilTableLockInterface.

Definition at line 82 of file class.ilTableLock.php.

References setAlias().

83  {
84  $this->setAlias($alias_name);
85 
86  return $this;
87  }
+ Here is the call graph for this function:

◆ check()

ilTableLock::check ( )
Exceptions

Definition at line 53 of file class.ilTableLock.php.

References ilAtomQueryException\DB_ATOM_LOCK_TABLE_NONEXISTING, ilAtomQueryException\DB_ATOM_LOCK_WRONG_LEVEL, getLockLevel(), getTableName(), ilAtomQuery\LOCK_READ, ilAtomQuery\LOCK_WRITE, and setChecked().

54  {
55  if (!in_array($this->getLockLevel(), array( ilAtomQuery::LOCK_READ, ilAtomQuery::LOCK_WRITE ))) {
57  }
58  if (!$this->getTableName() || !$this->ilDBInstance->tableExists($this->getTableName())) {
60  }
61 
62  $this->setChecked(true);
63  }
Class ilAtomQueryException.
setChecked($checked)
+ Here is the call graph for this function:

◆ getAlias()

ilTableLock::getAlias ( )
Returns
string

Definition at line 129 of file class.ilTableLock.php.

References $alias.

130  {
131  return $this->alias;
132  }

◆ getLockLevel()

ilTableLock::getLockLevel ( )
Returns
int

Definition at line 147 of file class.ilTableLock.php.

References $lock_level.

Referenced by check().

148  {
149  return $this->lock_level;
150  }
+ Here is the caller graph for this function:

◆ getTableName()

ilTableLock::getTableName ( )
Returns
string

Definition at line 93 of file class.ilTableLock.php.

References $table_name.

Referenced by check().

94  {
95  return $this->table_name;
96  }
+ Here is the caller graph for this function:

◆ isChecked()

ilTableLock::isChecked ( )
Returns
boolean

Definition at line 165 of file class.ilTableLock.php.

References $checked.

166  {
167  return $this->checked;
168  }

◆ isLockSequence()

ilTableLock::isLockSequence ( )
Returns
boolean

Definition at line 111 of file class.ilTableLock.php.

References $lock_sequence.

112  {
113  return $this->lock_sequence;
114  }

◆ lockSequence()

ilTableLock::lockSequence (   $lock_bool)
Parameters
bool$lock_bool
Returns
$this

Implements ilTableLockInterface.

Definition at line 70 of file class.ilTableLock.php.

References setLockSequence().

71  {
72  $this->setLockSequence($lock_bool);
73 
74  return $this;
75  }
setLockSequence($lock_sequence)
+ Here is the call graph for this function:

◆ setAlias()

ilTableLock::setAlias (   $alias)
Parameters
string$alias

Definition at line 138 of file class.ilTableLock.php.

References $alias.

Referenced by aliasName().

139  {
140  $this->alias = $alias;
141  }
+ Here is the caller graph for this function:

◆ setChecked()

ilTableLock::setChecked (   $checked)
Parameters
boolean$checked

Definition at line 174 of file class.ilTableLock.php.

References $checked.

Referenced by check().

175  {
176  $this->checked = $checked;
177  }
+ Here is the caller graph for this function:

◆ setLockLevel()

ilTableLock::setLockLevel (   $lock_level)
Parameters
int$lock_level

Definition at line 156 of file class.ilTableLock.php.

References $lock_level.

157  {
158  $this->lock_level = $lock_level;
159  }

◆ setLockSequence()

ilTableLock::setLockSequence (   $lock_sequence)
Parameters
boolean$lock_sequence

Definition at line 120 of file class.ilTableLock.php.

References $lock_sequence.

Referenced by lockSequence().

121  {
122  $this->lock_sequence = $lock_sequence;
123  }
+ Here is the caller graph for this function:

◆ setTableName()

ilTableLock::setTableName (   $table_name)
Parameters
string$table_name

Definition at line 102 of file class.ilTableLock.php.

References $table_name.

103  {
104  $this->table_name = $table_name;
105  }

Field Documentation

◆ $alias

ilTableLock::$alias = ''
protected

Definition at line 23 of file class.ilTableLock.php.

Referenced by getAlias(), and setAlias().

◆ $checked

ilTableLock::$checked = false
protected

Definition at line 31 of file class.ilTableLock.php.

Referenced by isChecked(), and setChecked().

◆ $ilDBInstance

ilTableLock::$ilDBInstance
protected

Definition at line 35 of file class.ilTableLock.php.

◆ $lock_level

ilTableLock::$lock_level = ilAtomQuery::LOCK_WRITE
protected

Definition at line 27 of file class.ilTableLock.php.

Referenced by getLockLevel(), and setLockLevel().

◆ $lock_sequence

ilTableLock::$lock_sequence = false
protected

Definition at line 19 of file class.ilTableLock.php.

Referenced by isLockSequence(), and setLockSequence().

◆ $table_name

ilTableLock::$table_name = ''
protected

Definition at line 15 of file class.ilTableLock.php.

Referenced by __construct(), getTableName(), and setTableName().


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