ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.arSelect.php
Go to the documentation of this file.
1 <?php
2 require_once(dirname(__FILE__) . '/../Statement/class.arStatement.php');
3 
11 class arSelect extends arStatement
12 {
13 
17  protected $table_name = '';
21  protected $as = '';
25  protected $field_name = '';
26 
27 
33  public function asSQLStatement(ActiveRecord $ar)
34  {
35  $return = '';
36  if ($this->getTableName()) {
37  $return .= $this->getTableName() . '.';
38  }
39  $return .= $this->getFieldName();
40  if ($this->getAs() and $this->getFieldName() != '*') {
41  $return .= ' AS ' . $this->getAs();
42  }
43 
44  return $return;
45  }
46 
47 
51  public function getTableName()
52  {
53  return $this->table_name;
54  }
55 
56 
60  public function setTableName($table_name)
61  {
62  $this->table_name = $table_name;
63  }
64 
65 
69  public function getAs()
70  {
71  return $this->as;
72  }
73 
74 
78  public function setAs($as)
79  {
80  $this->as = $as;
81  }
82 
83 
87  public function getFieldName()
88  {
89  return $this->field_name;
90  }
91 
92 
96  public function setFieldName($field_name)
97  {
98  $this->field_name = $field_name;
99  }
100 }
Class ActiveRecord.
Class arStatement.
setTableName($table_name)
Class arSelect.
setFieldName($field_name)
asSQLStatement(ActiveRecord $ar)