ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.arHaving.php
Go to the documentation of this file.
1 <?php
2 require_once(dirname(__FILE__) . '/../Statement/class.arStatement.php');
3 
10 class arHaving extends arStatement {
11 
15  protected $table_name = '';
19  protected $fieldname = '';
23  protected $value;
27  protected $operator = '=';
31  protected $statement = '';
35  protected $glue = 'AND';
36 
37 
46  public function asSQLStatement(ActiveRecord $ar) {
47  $statement = '';
48  if ($this->getTableName()) {
49  $statement .= $this->getTableName() . '.';
50  }
51  $statement .= $this->getFieldname() . ' ' . $this->getOperator() . ' "' . $this->getValue().'"';
52  $this->setStatement($statement);
53 
54  return $this->getStatement();
55  }
56 
57 
61  public function getFieldname() {
62  return $this->fieldname;
63  }
64 
65 
69  public function setFieldname($fieldname) {
70  $this->fieldname = $fieldname;
71  }
72 
73 
77  public function getValue() {
78  return $this->value;
79  }
80 
81 
85  public function setValue($value) {
86  $this->value = $value;
87  }
88 
89 
93  public function getOperator() {
94  return $this->operator;
95  }
96 
97 
101  public function setOperator($operator) {
102  $this->operator = $operator;
103  }
104 
105 
109  public function getStatement() {
110  return $this->statement;
111  }
112 
113 
117  public function setStatement($statement) {
118  $this->statement = $statement;
119  }
120 
121 
125  public function getGlue() {
126  return $this->glue;
127  }
128 
129 
133  public function setGlue($glue) {
134  $this->glue = $glue;
135  }
136 
137 
141  public function getTableName() {
142  return $this->table_name;
143  }
144 
145 
149  public function setTableName($table_name) {
150  $this->table_name = $table_name;
151  }
152 }
153 
154 ?>
Class ActiveRecord.
setStatement($statement)
setOperator($operator)
setGlue($glue)
asSQLStatement(ActiveRecord $ar)
Build WHERE Statement
Class arStatement.
setFieldname($fieldname)
setTableName($table_name)
Class arHaving.
setValue($value)