ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 (mixed $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 96 of file class.arHaving.php.

References $glue.

96  : string
97  {
98  return $this->glue;
99  }
string $glue

◆ getOperator()

arHaving::getOperator ( )

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

Referenced by asSQLStatement().

76  : string
77  {
78  return $this->operator;
79  }
+ Here is the caller graph for this function:

◆ getStatement()

arHaving::getStatement ( )

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

References $statement.

Referenced by asSQLStatement().

86  : string
87  {
88  return $this->statement;
89  }
string $statement
+ Here is the caller graph for this function:

◆ getTableName()

arHaving::getTableName ( )

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

References $table_name.

Referenced by asSQLStatement().

106  : string
107  {
108  return $this->table_name;
109  }
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 101 of file class.arHaving.php.

References $glue.

101  : void
102  {
103  $this->glue = $glue;
104  }
string $glue

◆ setOperator()

arHaving::setOperator ( string  $operator)

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

81  : void
82  {
83  $this->operator = $operator;
84  }

◆ setStatement()

arHaving::setStatement ( string  $statement)

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

References $statement.

Referenced by asSQLStatement().

91  : void
92  {
93  $this->statement = $statement;
94  }
string $statement
+ Here is the caller graph for this function:

◆ setTableName()

arHaving::setTableName ( string  $table_name)

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

References $table_name.

111  : void
112  {
113  $this->table_name = $table_name;
114  }
string $table_name

◆ setValue()

arHaving::setValue ( mixed  $value)

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

References $value.

71  : void
72  {
73  $this->value = $value;
74  }

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: