ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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$dbBuild WHERE Statement
Exceptions
arException

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

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

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()) . '';
48  $this->setStatement($statement);
49 
50  return $this->getStatement();
51  }
quoteIdentifier(string $identifier, bool $check_option=false)
string $statement
setStatement(string $statement)
quote($value, string $type)
+ Here is the call graph for this function:

◆ getFieldname()

arHaving::getFieldname ( )

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

References $fieldname.

Referenced by asSQLStatement().

53  : string
54  {
55  return $this->fieldname;
56  }
string $fieldname
+ Here is the caller graph for this function:

◆ getGlue()

arHaving::getGlue ( )

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

References $glue.

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

◆ getOperator()

arHaving::getOperator ( )

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

Referenced by asSQLStatement().

79  : string
80  {
81  return $this->operator;
82  }
+ Here is the caller graph for this function:

◆ getStatement()

arHaving::getStatement ( )

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

References $statement.

Referenced by asSQLStatement().

89  : string
90  {
91  return $this->statement;
92  }
string $statement
+ Here is the caller graph for this function:

◆ getTableName()

arHaving::getTableName ( )

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

References $table_name.

Referenced by asSQLStatement().

109  : string
110  {
111  return $this->table_name;
112  }
string $table_name
+ Here is the caller graph for this function:

◆ getValue()

arHaving::getValue ( )
Returns
mixed|null

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

References $value.

Referenced by asSQLStatement().

67  {
68  return $this->value;
69  }
+ Here is the caller graph for this function:

◆ setFieldname()

arHaving::setFieldname ( string  $fieldname)

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

References $fieldname.

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

◆ setGlue()

arHaving::setGlue ( string  $glue)

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

References $glue.

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

◆ setOperator()

arHaving::setOperator ( string  $operator)

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

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

◆ setStatement()

arHaving::setStatement ( string  $statement)

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

References $statement.

Referenced by asSQLStatement().

94  : void
95  {
96  $this->statement = $statement;
97  }
string $statement
+ Here is the caller graph for this function:

◆ setTableName()

arHaving::setTableName ( string  $table_name)

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

References $table_name.

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

◆ setValue()

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

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

References $value.

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

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.

◆ $statement

string arHaving::$statement = ''
protected

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

Referenced by 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: