ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.arStatementCollection.php
Go to the documentation of this file.
1 <?php
2 require_once('class.arStatement.php');
3 
10 abstract class arStatementCollection {
11 
15  protected static $cache = array();
19  protected $statements = array();
23  protected $ar;
24 
25 
29  public function add(arStatement $statement) {
30  $this->statements[] = $statement;
31  }
32 
33 
37  public function hasStatements() {
38  return count($this->statements) > 0;
39  }
40 
41 
47  public static function getInstance(ActiveRecord $ar) {
52  $classname = get_called_class();
53  $arWhereCollection = new $classname();
54  $arWhereCollection->setAr($ar);
55 
56  return $arWhereCollection;
57  }
58 
59 
63  abstract public function asSQLStatement();
64 
65 
69  public function asORACLEStatement() {
70  return $this->asSQLStatement();
71  }
72 
73 
77  public function setAr($ar) {
78  $this->ar = $ar;
79  }
80 
81 
85  public function getAr() {
86  return $this->ar;
87  }
88 
89 
93  public function setStatements($statements) {
94  $this->statements = $statements;
95  }
96 
97 
101  public function getStatements() {
102  return $this->statements;
103  }
104 }
105 
106 ?>
Class arStatementCollection.
Class ActiveRecord.
Class arStatement.
Create styles array
The data for the language used.