ILIAS  release_8 Revision v8.24
arHaving 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 arHaving:
+ Collaboration diagram for arHaving:

Public Member Functions

 asSQLStatement (ActiveRecord $activeRecord, ilDBInterface $db)
 
 getFieldname ()
 
 setFieldname (string $fieldname)
 
 getValue ()
 
 setValue ($value)
 
 getOperator ()
 
 setOperator (string $operator)
 
 getStatement ()
 
 setStatement (string $statement)
 
 getGlue ()
 
 setGlue (string $glue)
 
 getTableName ()
 
 setTableName (string $table_name)
 
- Public Member Functions inherited from arStatement
 asSQLStatement (ActiveRecord $activeRecord, ilDBInterface $db)
 
 getTableNameAs ()
 
 setTableNameAs (string $table_name_as)
 

Protected Attributes

string $table_name = ''
 
string $fieldname = ''
 
 $value
 
string $operator = '='
 
string $statement = ''
 
string $glue = 'AND'
 
- Protected Attributes inherited from arStatement
string $table_name_as = ''
 

Additional Inherited Members

- Protected Member Functions inherited from arStatement
 wrapFields (array $fields, ilDBInterface $db)
 
 wrapField (string $field, ilDBInterface $db)
 

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 arHaving

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.arHaving.php.

Member Function Documentation

◆ asSQLStatement()

arHaving::asSQLStatement ( ActiveRecord  $activeRecord,
ilDBInterface  $db 
)
Parameters
ilDBInterface$db@description Build WHERE Statement
Exceptions
arException

Reimplemented from arStatement.

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

41 : string
42 {
43 $statement = '';
44 if ($this->getTableName() !== '' && $this->getTableName() !== '0') {
45 $statement .= $this->getTableName() . '.';
46 }
47 $statement .= $db->quoteIdentifier($this->getFieldname()) . ' ' . $this->getOperator() . ' ' . $db->quote($this->getValue()) . '';
49
50 return $this->getStatement();
51 }
string $statement
setStatement(string $statement)
quoteIdentifier(string $identifier, bool $check_option=false)
quote($value, string $type)

References $statement, getFieldname(), getOperator(), getStatement(), getTableName(), getValue(), ilDBInterface\quote(), ilDBInterface\quoteIdentifier(), and setStatement().

+ Here is the call graph for this function:

◆ getFieldname()

arHaving::getFieldname ( )

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

53 : string
54 {
55 return $this->fieldname;
56 }
string $fieldname

References $fieldname.

Referenced by asSQLStatement().

+ Here is the caller graph for this function:

◆ getGlue()

arHaving::getGlue ( )

Definition at line 99 of file class.arHaving.php.

99 : string
100 {
101 return $this->glue;
102 }
string $glue

References $glue.

◆ getOperator()

arHaving::getOperator ( )

Definition at line 79 of file class.arHaving.php.

79 : string
80 {
81 return $this->operator;
82 }
string $operator

References $operator.

Referenced by asSQLStatement().

+ Here is the caller graph for this function:

◆ getStatement()

arHaving::getStatement ( )

Definition at line 89 of file class.arHaving.php.

89 : string
90 {
91 return $this->statement;
92 }

References $statement.

Referenced by asSQLStatement().

+ Here is the caller graph for this function:

◆ getTableName()

arHaving::getTableName ( )

Definition at line 109 of file class.arHaving.php.

109 : string
110 {
111 return $this->table_name;
112 }
string $table_name

References $table_name.

Referenced by asSQLStatement().

+ Here is the caller graph for this function:

◆ getValue()

arHaving::getValue ( )
Returns
mixed|null

Definition at line 66 of file class.arHaving.php.

67 {
68 return $this->value;
69 }

References $value.

Referenced by asSQLStatement().

+ Here is the caller graph for this function:

◆ setFieldname()

arHaving::setFieldname ( string  $fieldname)

Definition at line 58 of file class.arHaving.php.

58 : void
59 {
60 $this->fieldname = $fieldname;
61 }

References $fieldname.

◆ setGlue()

arHaving::setGlue ( string  $glue)

Definition at line 104 of file class.arHaving.php.

104 : void
105 {
106 $this->glue = $glue;
107 }

References $glue.

◆ setOperator()

arHaving::setOperator ( string  $operator)

Definition at line 84 of file class.arHaving.php.

84 : void
85 {
86 $this->operator = $operator;
87 }

References $operator.

◆ setStatement()

arHaving::setStatement ( string  $statement)

Definition at line 94 of file class.arHaving.php.

94 : void
95 {
96 $this->statement = $statement;
97 }

References $statement.

Referenced by asSQLStatement().

+ Here is the caller graph for this function:

◆ setTableName()

arHaving::setTableName ( string  $table_name)

Definition at line 114 of file class.arHaving.php.

114 : void
115 {
116 $this->table_name = $table_name;
117 }

References $table_name.

◆ setValue()

arHaving::setValue (   $value)
Parameters
mixed$value

Definition at line 74 of file class.arHaving.php.

74 : void
75 {
76 $this->value = $value;
77 }

References $value.

Field Documentation

◆ $fieldname

string arHaving::$fieldname = ''
protected

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

Referenced by getFieldname(), and setFieldname().

◆ $glue

string arHaving::$glue = 'AND'
protected

Definition at line 34 of file class.arHaving.php.

Referenced by getGlue(), and setGlue().

◆ $operator

string arHaving::$operator = '='
protected

Definition at line 32 of file class.arHaving.php.

Referenced by getOperator(), and setOperator().

◆ $statement

string arHaving::$statement = ''
protected

Definition at line 33 of file class.arHaving.php.

Referenced by asSQLStatement(), getStatement(), and setStatement().

◆ $table_name

string arHaving::$table_name = ''
protected

Definition at line 26 of file class.arHaving.php.

Referenced by getTableName(), and setTableName().

◆ $value

arHaving::$value
protected

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

Referenced by getValue(), and setValue().


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