ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.arHaving.php
Go to the documentation of this file.
1<?php
2require_once(dirname(__FILE__) . '/../Statement/class.arStatement.php');
3
10class arHaving extends arStatement
11{
12
16 protected $table_name = '';
20 protected $fieldname = '';
24 protected $value;
28 protected $operator = '=';
32 protected $statement = '';
36 protected $glue = 'AND';
37
38
47 public function asSQLStatement(ActiveRecord $ar)
48 {
49 $statement = '';
50 if ($this->getTableName()) {
51 $statement .= $this->getTableName() . '.';
52 }
53 $statement .= $this->getFieldname() . ' ' . $this->getOperator() . ' "' . $this->getValue() . '"';
55
56 return $this->getStatement();
57 }
58
59
63 public function getFieldname()
64 {
65 return $this->fieldname;
66 }
67
68
72 public function setFieldname($fieldname)
73 {
74 $this->fieldname = $fieldname;
75 }
76
77
81 public function getValue()
82 {
83 return $this->value;
84 }
85
86
90 public function setValue($value)
91 {
92 $this->value = $value;
93 }
94
95
99 public function getOperator()
100 {
101 return $this->operator;
102 }
103
104
108 public function setOperator($operator)
109 {
110 $this->operator = $operator;
111 }
112
113
117 public function getStatement()
118 {
119 return $this->statement;
120 }
121
122
126 public function setStatement($statement)
127 {
128 $this->statement = $statement;
129 }
130
131
135 public function getGlue()
136 {
137 return $this->glue;
138 }
139
140
144 public function setGlue($glue)
145 {
146 $this->glue = $glue;
147 }
148
149
153 public function getTableName()
154 {
155 return $this->table_name;
156 }
157
158
162 public function setTableName($table_name)
163 {
164 $this->table_name = $table_name;
165 }
166}
Class ActiveRecord.
An exception for terminatinating execution or to throw for unit testing.
Class arHaving.
setOperator($operator)
setTableName($table_name)
setValue($value)
setFieldname($fieldname)
setGlue($glue)
asSQLStatement(ActiveRecord $ar)
@description Build WHERE Statement
setStatement($statement)
Class arStatement.