ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.arStatementCollection.php
Go to the documentation of this file.
1<?php
2require_once('class.arStatement.php');
3
11{
12
16 protected static $cache = array();
20 protected $statements = array();
24 protected $ar;
25
26
30 public function add(arStatement $statement)
31 {
32 $this->statements[] = $statement;
33 }
34
35
39 public function hasStatements()
40 {
41 return count($this->statements) > 0;
42 }
43
44
50 public static function getInstance(ActiveRecord $ar)
51 {
56 $classname = get_called_class();
57 $arWhereCollection = new $classname();
58 $arWhereCollection->setAr($ar);
59
60 return $arWhereCollection;
61 }
62
63
67 abstract public function asSQLStatement();
68
69
73 public function asORACLEStatement()
74 {
75 return $this->asSQLStatement();
76 }
77
78
82 public function setAr($ar)
83 {
84 $this->ar = $ar;
85 }
86
87
91 public function getAr()
92 {
93 return $this->ar;
94 }
95
96
100 public function setStatements($statements)
101 {
102 $this->statements = $statements;
103 }
104
105
109 public function getStatements()
110 {
111 return $this->statements;
112 }
113}
Class ActiveRecord.
An exception for terminatinating execution or to throw for unit testing.
Class arStatementCollection.
Class arStatement.