ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
arJoin Class Reference

Class arJoin. More...

+ Inheritance diagram for arJoin:
+ Collaboration diagram for arJoin:

Public Member Functions

 asSQLStatement (ActiveRecord $ar)
 
 asORACLEStatement (ActiveRecord $ar)
 
 setLeft ()
 
 setRght ()
 
 setInner ()
 
 setFields ($fields)
 
 getFields ()
 
 setOnFirstField ($on_first_field)
 
 getOnFirstField ()
 
 setOnSecondField ($on_second_field)
 
 getOnSecondField ()
 
 setOperator ($operator)
 
 getOperator ()
 
 setTableName ($table_name)
 
 getTableName ()
 
 setType ($type)
 
 getType ()
 
 setBothExternal ($both_external)
 
 getBothExternal ()
 
 setFullNames ($full_names)
 
 getFullNames ()
 
 isIsMapped ()
 
 setIsMapped ($is_mapped)
 
- Public Member Functions inherited from arStatement
 asSQLStatement (ActiveRecord $ar)
 
 asORACLEStatement (ActiveRecord $ar)
 
 getTableNameAs ()
 
 setTableNameAs ($table_name_as)
 

Data Fields

const TYPE_NORMAL = self::TYPE_INNER
 
const TYPE_LEFT = 'LEFT'
 
const TYPE_RIGHT = 'RIGHT'
 
const TYPE_INNER = 'INNER'
 

Protected Member Functions

 asStatementText (ActiveRecord $ar, $as=' AS ')
 

Protected Attributes

 $type = self::TYPE_NORMAL
 
 $table_name = ''
 
 $fields = array( '*' )
 
 $operator='='
 
 $on_first_field = ''
 
 $on_second_field = ''
 
 $full_names = false
 
 $both_external = false
 
 $is_mapped = false
 
- Protected Attributes inherited from arStatement
 $table_name_as = ''
 

Detailed Description

Class arJoin.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
2.0.7

Definition at line 11 of file class.arJoin.php.

Member Function Documentation

◆ asORACLEStatement()

arJoin::asORACLEStatement ( ActiveRecord  $ar)
Parameters
\ActiveRecord$ar
Returns
string

Definition at line 90 of file class.arJoin.php.

References asStatementText().

91  {
92  return $this->asStatementText($ar, ' ');
93  }
asStatementText(ActiveRecord $ar, $as=' AS ')
+ Here is the call graph for this function:

◆ asSQLStatement()

arJoin::asSQLStatement ( ActiveRecord  $ar)
Parameters
ActiveRecord$ar
Returns
string

Definition at line 80 of file class.arJoin.php.

References asStatementText().

81  {
82  return $this->asStatementText($ar, ' AS ');
83  }
asStatementText(ActiveRecord $ar, $as=' AS ')
+ Here is the call graph for this function:

◆ asStatementText()

arJoin::asStatementText ( ActiveRecord  $ar,
  $as = ' AS ' 
)
protected
Parameters
\ActiveRecord$ar
string$as
Returns
string

Definition at line 60 of file class.arJoin.php.

References $as, getBothExternal(), ActiveRecord\getConnectorContainerName(), getOnFirstField(), getOnSecondField(), getOperator(), getTableName(), arStatement\getTableNameAs(), and getType().

Referenced by asORACLEStatement(), and asSQLStatement().

61  {
62  $return = ' ' . $this->getType() . ' ';
63  $return .= ' JOIN ' . $this->getTableName() . $as . $this->getTableNameAs();
64  if ($this->getBothExternal()) {
65  $return .= ' ON ' . $this->getOnFirstField() . ' ' . $this->getOperator() . ' ';
66  } else {
67  $return .= ' ON ' . $ar->getConnectorContainerName() . '.' . $this->getOnFirstField() . ' ' . $this->getOperator() . ' ';
68  }
69  $return .= $this->getTableNameAs() . '.' . $this->getOnSecondField();
70 
71  return $return;
72  }
getTableName()
getBothExternal()
$as
getOnFirstField()
getOnSecondField()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBothExternal()

arJoin::getBothExternal ( )
Returns
boolean

Definition at line 234 of file class.arJoin.php.

References $both_external.

Referenced by asStatementText().

235  {
236  return $this->both_external;
237  }
+ Here is the caller graph for this function:

◆ getFields()

arJoin::getFields ( )
Returns
array

Definition at line 126 of file class.arJoin.php.

References $fields.

127  {
128  return $this->fields;
129  }

◆ getFullNames()

arJoin::getFullNames ( )
Returns
boolean

Definition at line 252 of file class.arJoin.php.

References $full_names.

253  {
254  return $this->full_names;
255  }

◆ getOnFirstField()

arJoin::getOnFirstField ( )
Returns
string

Definition at line 144 of file class.arJoin.php.

References $on_first_field.

Referenced by asStatementText().

145  {
146  return $this->on_first_field;
147  }
+ Here is the caller graph for this function:

◆ getOnSecondField()

arJoin::getOnSecondField ( )
Returns
string

Definition at line 162 of file class.arJoin.php.

References $on_second_field.

Referenced by asStatementText().

163  {
164  return $this->on_second_field;
165  }
$on_second_field
+ Here is the caller graph for this function:

◆ getOperator()

arJoin::getOperator ( )
Returns
string

Definition at line 180 of file class.arJoin.php.

Referenced by asStatementText().

181  {
182  return $this->operator;
183  }
+ Here is the caller graph for this function:

◆ getTableName()

arJoin::getTableName ( )
Returns
string

Definition at line 198 of file class.arJoin.php.

References $table_name.

Referenced by asStatementText(), and arJoinCollection\getSaveTableName().

199  {
200  return $this->table_name;
201  }
+ Here is the caller graph for this function:

◆ getType()

arJoin::getType ( )
Returns
string

Definition at line 216 of file class.arJoin.php.

References $type.

Referenced by asStatementText().

217  {
218  return $this->type;
219  }
+ Here is the caller graph for this function:

◆ isIsMapped()

arJoin::isIsMapped ( )
Returns
boolean

Definition at line 261 of file class.arJoin.php.

References $is_mapped.

262  {
263  return $this->is_mapped;
264  }

◆ setBothExternal()

arJoin::setBothExternal (   $both_external)
Parameters
boolean$both_external

Definition at line 225 of file class.arJoin.php.

References $both_external.

226  {
227  $this->both_external = $both_external;
228  }

◆ setFields()

arJoin::setFields (   $fields)
Parameters
array$fields

Definition at line 117 of file class.arJoin.php.

References $fields, and fields.

118  {
119  $this->fields = $fields;
120  }
$errors fields
Definition: imgupload.php:51

◆ setFullNames()

arJoin::setFullNames (   $full_names)
Parameters
boolean$full_names

Definition at line 243 of file class.arJoin.php.

References $full_names.

Referenced by arJoinCollection\getSaveTableName().

244  {
245  $this->full_names = $full_names;
246  }
+ Here is the caller graph for this function:

◆ setInner()

arJoin::setInner ( )

Definition at line 108 of file class.arJoin.php.

References setType().

109  {
110  $this->setType(self::TYPE_INNER);
111  }
setType($type)
+ Here is the call graph for this function:

◆ setIsMapped()

arJoin::setIsMapped (   $is_mapped)
Parameters
boolean$is_mapped

Definition at line 270 of file class.arJoin.php.

References $is_mapped.

Referenced by arJoinCollection\getSaveTableName().

271  {
272  $this->is_mapped = $is_mapped;
273  }
+ Here is the caller graph for this function:

◆ setLeft()

arJoin::setLeft ( )

Definition at line 96 of file class.arJoin.php.

References setType().

97  {
98  $this->setType(self::TYPE_LEFT);
99  }
setType($type)
+ Here is the call graph for this function:

◆ setOnFirstField()

arJoin::setOnFirstField (   $on_first_field)
Parameters
string$on_first_field

Definition at line 135 of file class.arJoin.php.

References $on_first_field.

136  {
137  $this->on_first_field = $on_first_field;
138  }

◆ setOnSecondField()

arJoin::setOnSecondField (   $on_second_field)
Parameters
string$on_second_field

Definition at line 153 of file class.arJoin.php.

References $on_second_field.

154  {
155  $this->on_second_field = $on_second_field;
156  }
$on_second_field

◆ setOperator()

arJoin::setOperator (   $operator)
Parameters
string$operator

Definition at line 171 of file class.arJoin.php.

172  {
173  $this->operator = $operator;
174  }

◆ setRght()

arJoin::setRght ( )

Definition at line 102 of file class.arJoin.php.

References setType().

103  {
104  $this->setType(self::TYPE_RIGHT);
105  }
setType($type)
+ Here is the call graph for this function:

◆ setTableName()

arJoin::setTableName (   $table_name)
Parameters
string$table_name

Definition at line 189 of file class.arJoin.php.

References $table_name.

190  {
191  $this->table_name = $table_name;
192  }

◆ setType()

arJoin::setType (   $type)
Parameters
string$type

Definition at line 207 of file class.arJoin.php.

References $type.

Referenced by setInner(), setLeft(), and setRght().

208  {
209  $this->type = $type;
210  }
+ Here is the caller graph for this function:

Field Documentation

◆ $both_external

arJoin::$both_external = false
protected

Definition at line 48 of file class.arJoin.php.

Referenced by getBothExternal(), and setBothExternal().

◆ $fields

arJoin::$fields = array( '*' )
protected

Definition at line 28 of file class.arJoin.php.

Referenced by getFields(), and setFields().

◆ $full_names

arJoin::$full_names = false
protected

Definition at line 44 of file class.arJoin.php.

Referenced by getFullNames(), and setFullNames().

◆ $is_mapped

arJoin::$is_mapped = false
protected

Definition at line 52 of file class.arJoin.php.

Referenced by isIsMapped(), and setIsMapped().

◆ $on_first_field

arJoin::$on_first_field = ''
protected

Definition at line 36 of file class.arJoin.php.

Referenced by getOnFirstField(), and setOnFirstField().

◆ $on_second_field

arJoin::$on_second_field = ''
protected

Definition at line 40 of file class.arJoin.php.

Referenced by getOnSecondField(), and setOnSecondField().

◆ $operator='='

arJoin::$operator='='
protected

Definition at line 32 of file class.arJoin.php.

◆ $table_name

arJoin::$table_name = ''
protected

Definition at line 24 of file class.arJoin.php.

Referenced by getTableName(), and setTableName().

◆ $type

arJoin::$type = self::TYPE_NORMAL
protected

Definition at line 20 of file class.arJoin.php.

Referenced by getType(), and setType().

◆ TYPE_INNER

const arJoin::TYPE_INNER = 'INNER'

Definition at line 16 of file class.arJoin.php.

Referenced by ActiveRecordList\innerjoin().

◆ TYPE_LEFT

const arJoin::TYPE_LEFT = 'LEFT'

Definition at line 14 of file class.arJoin.php.

Referenced by ActiveRecordList\leftjoin().

◆ TYPE_NORMAL

const arJoin::TYPE_NORMAL = self::TYPE_INNER

Definition at line 13 of file class.arJoin.php.

◆ TYPE_RIGHT

const arJoin::TYPE_RIGHT = 'RIGHT'

Definition at line 15 of file class.arJoin.php.


The documentation for this class was generated from the following file: