ILIAS  release_8 Revision v8.24
arJoin Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

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

Data Fields

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

Protected Member Functions

 asStatementText (ActiveRecord $activeRecord, ilDBInterface $db, string $as=' AS ')
 
- Protected Member Functions inherited from arStatement
 wrapFields (array $fields, ilDBInterface $db)
 
 wrapField (string $field, ilDBInterface $db)
 

Protected Attributes

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

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 24 of file class.arJoin.php.

Member Function Documentation

◆ asSQLStatement()

arJoin::asSQLStatement ( ActiveRecord  $activeRecord,
ilDBInterface  $db 
)

Reimplemented from arStatement.

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

55 : string
56 {
57 return $this->asStatementText($activeRecord, $db, self::AS_TEXT);
58 }
asStatementText(ActiveRecord $activeRecord, ilDBInterface $db, string $as=' AS ')

References asStatementText().

+ Here is the call graph for this function:

◆ asStatementText()

arJoin::asStatementText ( ActiveRecord  $activeRecord,
ilDBInterface  $db,
string  $as = ' AS ' 
)
protected

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

41 : string
42 {
43 $return = ' ' . $this->getType() . ' ';
44 $return .= ' JOIN ' . $this->getTableName() . $as . $this->getTableNameAs();
45 if ($this->getBothExternal()) {
46 $return .= ' ON ' . $db->quoteIdentifier($this->getOnFirstField()) . ' ' . $this->getOperator() . ' ';
47 } else {
48 $return .= ' ON ' . $db->quoteIdentifier($activeRecord->getConnectorContainerName()) . '.' . $this->getOnFirstField(
49 ) . ' ' . $this->getOperator() . ' ';
50 }
51
52 return $return . $db->quoteIdentifier($this->getTableNameAs()) . '.' . $db->quoteIdentifier($this->getOnSecondField());
53 }
getConnectorContainerName()
@description Return the Name of your Connector Table
getOnFirstField()
getBothExternal()
getTableName()
getOnSecondField()
quoteIdentifier(string $identifier, bool $check_option=false)

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

Referenced by asSQLStatement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBothExternal()

arJoin::getBothExternal ( )

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

140 : bool
141 {
143 }
bool $both_external

References $both_external.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getFields()

arJoin::getFields ( )

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

80 : array
81 {
82 return $this->fields;
83 }
array $fields

References $fields.

◆ getFullNames()

arJoin::getFullNames ( )

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

150 : bool
151 {
152 return $this->full_names;
153 }
bool $full_names

References $full_names.

◆ getOnFirstField()

arJoin::getOnFirstField ( )

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

90 : string
91 {
93 }
string $on_first_field

References $on_first_field.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getOnSecondField()

arJoin::getOnSecondField ( )

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

100 : string
101 {
103 }
string $on_second_field

References $on_second_field.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getOperator()

arJoin::getOperator ( )

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

110 : string
111 {
112 return $this->operator;
113 }
string $operator

References $operator.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getTableName()

arJoin::getTableName ( )

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

120 : string
121 {
122 return $this->table_name;
123 }
string $table_name

References $table_name.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getType()

arJoin::getType ( )

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

130 : string
131 {
132 return $this->type;
133 }
string $type

References $type.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ isIsMapped()

arJoin::isIsMapped ( )

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

155 : bool
156 {
157 return $this->is_mapped;
158 }
bool $is_mapped

References $is_mapped.

◆ setBothExternal()

arJoin::setBothExternal ( bool  $both_external)

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

135 : void
136 {
137 $this->both_external = $both_external;
138 }

References $both_external.

◆ setFields()

arJoin::setFields ( array  $fields)

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

75 : void
76 {
77 $this->fields = $fields;
78 }
$errors fields
Definition: imgupload.php:67

References $fields, and fields.

◆ setFullNames()

arJoin::setFullNames ( bool  $full_names)

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

145 : void
146 {
147 $this->full_names = $full_names;
148 }

References $full_names.

◆ setInner()

arJoin::setInner ( )

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

70 : void
71 {
72 $this->setType(self::TYPE_INNER);
73 }
setType(string $type)

References setType().

+ Here is the call graph for this function:

◆ setIsMapped()

arJoin::setIsMapped ( bool  $is_mapped)

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

160 : void
161 {
162 $this->is_mapped = $is_mapped;
163 }

References $is_mapped.

◆ setLeft()

arJoin::setLeft ( )

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

60 : void
61 {
62 $this->setType(self::TYPE_LEFT);
63 }

References setType().

+ Here is the call graph for this function:

◆ setOnFirstField()

arJoin::setOnFirstField ( string  $on_first_field)

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

85 : void
86 {
87 $this->on_first_field = $on_first_field;
88 }

References $on_first_field.

◆ setOnSecondField()

arJoin::setOnSecondField ( string  $on_second_field)

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

95 : void
96 {
97 $this->on_second_field = $on_second_field;
98 }

References $on_second_field.

◆ setOperator()

arJoin::setOperator ( string  $operator)

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

105 : void
106 {
107 $this->operator = $operator;
108 }

References $operator.

◆ setRght()

arJoin::setRght ( )

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

65 : void
66 {
67 $this->setType(self::TYPE_RIGHT);
68 }

References setType().

+ Here is the call graph for this function:

◆ setTableName()

arJoin::setTableName ( string  $table_name)

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

115 : void
116 {
117 $this->table_name = $table_name;
118 }

References $table_name.

◆ setType()

arJoin::setType ( string  $type)

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

125 : void
126 {
127 $this->type = $type;
128 }

References $type.

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

+ Here is the caller graph for this function:

Field Documentation

◆ $both_external

bool arJoin::$both_external = false
protected

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

Referenced by getBothExternal(), and setBothExternal().

◆ $fields

array arJoin::$fields = ['*']
protected

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

Referenced by getFields(), and setFields().

◆ $full_names

bool arJoin::$full_names = false
protected

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

Referenced by getFullNames(), and setFullNames().

◆ $is_mapped

bool arJoin::$is_mapped = false
protected

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

Referenced by isIsMapped(), and setIsMapped().

◆ $on_first_field

string arJoin::$on_first_field = ''
protected

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

Referenced by getOnFirstField(), and setOnFirstField().

◆ $on_second_field

string arJoin::$on_second_field = ''
protected

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

Referenced by getOnSecondField(), and setOnSecondField().

◆ $operator

string arJoin::$operator = '='
protected

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

Referenced by getOperator(), and setOperator().

◆ $table_name

string arJoin::$table_name = ''
protected

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

Referenced by getTableName(), and setTableName().

◆ $type

string arJoin::$type = self::TYPE_NORMAL
protected

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

Referenced by getType(), and setType().

◆ AS_TEXT

const arJoin::AS_TEXT = ' AS '

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

◆ TYPE_INNER

const arJoin::TYPE_INNER = 'INNER'

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

◆ TYPE_LEFT

const arJoin::TYPE_LEFT = 'LEFT'

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

◆ TYPE_NORMAL

const arJoin::TYPE_NORMAL = self::TYPE_INNER

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

◆ TYPE_RIGHT

const arJoin::TYPE_RIGHT = 'RIGHT'

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


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