ILIAS  release_8 Revision v8.24
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 24 of file class.arStatement.php.

Member Function Documentation

◆ asSQLStatement()

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

Reimplemented in arConcat, arHaving, arJoin, arLimit, arOrder, arSelect, and arWhere.

◆ getTableNameAs()

arStatement::getTableNameAs ( )

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

30 : string
31 {
33 }

References $table_name_as.

Referenced by arJoin\asStatementText().

+ Here is the caller graph for this function:

◆ setTableNameAs()

arStatement::setTableNameAs ( string  $table_name_as)

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

35 : void
36 {
37 $this->table_name_as = $table_name_as;
38 }

References $table_name_as.

Referenced by arJoinCollection\add().

+ Here is the caller graph for this function:

◆ wrapField()

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

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

51 : string
52 {
53 $slitted = explode('.', $field);
54
55 if (count($slitted) === 1 && $slitted[0] === '*') {
56 return $field;
57 }
58
59 if (count($slitted) === 2) {
60 return $db->quoteIdentifier($slitted[0]) . '.' . $db->quoteIdentifier($slitted[1]);
61 }
62
63 return $db->quoteIdentifier($field);
64 }
quoteIdentifier(string $identifier, bool $check_option=false)

References ilDBInterface\quoteIdentifier().

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

+ 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 40 of file class.arStatement.php.

40 : array
41 {
42 $wrapped_fields = [];
43
44 foreach ($fields as $field) {
45 $wrapped_fields[] = $this->wrapField($field, $db);
46 }
47
48 return $wrapped_fields;
49 }
wrapField(string $field, ilDBInterface $db)

References wrapField().

Referenced by arConcat\asSQLStatement().

+ 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 26 of file class.arStatement.php.

Referenced by getTableNameAs(), and setTableNameAs().


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