ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.arStatementCollection.php
Go to the documentation of this file.
1<?php
2require_once('class.arStatement.php');
3
10abstract 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 setAr($ar) {
70 $this->ar = $ar;
71 }
72
73
77 public function getAr() {
78 return $this->ar;
79 }
80
81
85 public function setStatements($statements) {
86 $this->statements = $statements;
87 }
88
89
93 public function getStatements() {
94 return $this->statements;
95 }
96}
97
98?>
Class ActiveRecord.
Class arStatementCollection.
Class arStatement.