ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
arWhereCollection 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 arWhereCollection:
+ Collaboration diagram for arWhereCollection:

Public Member Functions

 asSQLStatement (ilDBInterface $db)
 
 getWheres ()
 
- Public Member Functions inherited from arStatementCollection
 add (arStatement $statement)
 
 hasStatements ()
 
 asSQLStatement (ilDBInterface $db)
 
 setAr (ActiveRecord $ar)
 
 getAr ()
 
 setStatements (array $statements)
 
 getStatements ()
 

Additional Inherited Members

- Protected Attributes inherited from arStatementCollection
array $statements = []
 
ActiveRecord $ar = null
 
- Static Protected Attributes inherited from arStatementCollection
static array $cache = []
 

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 arWhereCollection

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

Member Function Documentation

◆ asSQLStatement()

arWhereCollection::asSQLStatement ( ilDBInterface  $db)

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

References arStatementCollection\getAr(), getWheres(), and arStatementCollection\hasStatements().

26  : string
27  {
28  $return = '';
29  if ($this->hasStatements()) {
30  $return .= ' WHERE ';
31  $wheres = $this->getWheres();
32  $last = end($wheres);
33  foreach ($wheres as $where) {
34  $return .= $where->asSQLStatement($this->getAr(), $db);
35  if ($where !== $last) {
36  $return .= ' ' . $where->getLink() . ' ';
37  }
38  }
39  }
40 
41  return $return;
42  }
+ Here is the call graph for this function:

◆ getWheres()

arWhereCollection::getWheres ( )
Returns
arWhere[]

Definition at line 47 of file class.arWhereCollection.php.

References arStatementCollection\$statements.

Referenced by asSQLStatement().

47  : array
48  {
49  return $this->statements;
50  }
+ Here is the caller graph for this function:

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