ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
arStatement Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for arStatement:
+ Collaboration diagram for arStatement:

Public Member Functions

 asSQLStatement (ActiveRecord $activeRecord, ilDBInterface $db)
 
 getTableNameAs ()
 
 setTableNameAs (string $table_name_as)
 

Protected Member Functions

 wrapFields (array $fields, ilDBInterface $db)
 
 wrapField (string $field, ilDBInterface $db)
 

Protected Attributes

string $table_name_as = ''
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class arStatement

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

Definition at line 25 of file class.arStatement.php.

Member Function Documentation

◆ asSQLStatement()

arStatement::asSQLStatement ( ActiveRecord  $activeRecord,
ilDBInterface  $db 
)
abstract

◆ getTableNameAs()

arStatement::getTableNameAs ( )

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

References $table_name_as.

Referenced by arJoin\asStatementText().

31  : string
32  {
33  return $this->table_name_as;
34  }
+ Here is the caller graph for this function:

◆ setTableNameAs()

arStatement::setTableNameAs ( string  $table_name_as)

Definition at line 36 of file class.arStatement.php.

References $table_name_as.

Referenced by arJoinCollection\add().

36  : void
37  {
38  $this->table_name_as = $table_name_as;
39  }
+ Here is the caller graph for this function:

◆ wrapField()

arStatement::wrapField ( string  $field,
ilDBInterface  $db 
)
protected

Definition at line 55 of file class.arStatement.php.

References ilDBInterface\quoteIdentifier().

Referenced by arOrder\asSQLStatement(), arSelect\asSQLStatement(), arJoin\asStatementText(), and wrapFields().

55  : string
56  {
57  $slitted = explode('.', $field);
58 
59  if (count($slitted) === 1 && $slitted[0] === '*') {
60  return $field;
61  }
62 
63  if (count($slitted) === 2) {
64  return $db->quoteIdentifier($slitted[0]) . '.' . $db->quoteIdentifier($slitted[1]);
65  }
66 
67  return $db->quoteIdentifier($field);
68  }
quoteIdentifier(string $identifier, bool $check_option=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wrapFields()

arStatement::wrapFields ( array  $fields,
ilDBInterface  $db 
)
protected

Definition at line 41 of file class.arStatement.php.

References wrapField().

Referenced by arConcat\asSQLStatement().

41  : array
42  {
43  $wrapped_fields = [];
44 
45  foreach ($fields as $field) {
46  if (empty($field)) {
47  continue;
48  }
49  $wrapped_fields[] = $this->wrapField($field, $db);
50  }
51 
52  return $wrapped_fields;
53  }
wrapField(string $field, ilDBInterface $db)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $table_name_as

string arStatement::$table_name_as = ''
protected

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

Referenced by getTableNameAs(), and setTableNameAs().


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