ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 25 of file class.arJoin.php.

Member Function Documentation

◆ asSQLStatement()

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

Reimplemented from arStatement.

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

64 : string
65 {
66 return $this->asStatementText($activeRecord, $db, self::AS_TEXT);
67 }
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 42 of file class.arJoin.php.

42 : string
43 {
44 $return = ' ' . $this->getType() . ' ';
45 $return .= ' JOIN ' . $this->getTableName() . $as . $this->getTableNameAs();
46 if ($this->getBothExternal()) {
47 $return .= ' ON ' . $this->wrapField($this->getOnFirstField(), $db) . ' ' . $this->getOperator() . ' ';
48 } else {
49 $return .= ' ON '
50 . $this->wrapField(
51 $activeRecord->getConnectorContainerName() . '.' . $this->getOnFirstField(),
52 $db
53 )
54 . ' ' . $this->getOperator() . ' ';
55 }
56
57 return $return . $this->wrapField(
58 $this->getTableNameAs() . '.' .
59 $this->getOnSecondField(),
60 $db
61 );
62 }
getConnectorContainerName()
@description Return the Name of your Connector Table
getOnFirstField()
getBothExternal()
getTableName()
getOnSecondField()
wrapField(string $field, ilDBInterface $db)

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

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 155 of file class.arJoin.php.

155 : bool
156 {
158 }
bool $both_external

References $both_external.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getFields()

arJoin::getFields ( )
Returns
mixed[]

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

95 : array
96 {
97 return $this->fields;
98 }
array $fields

References $fields.

◆ getFullNames()

arJoin::getFullNames ( )

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

165 : bool
166 {
167 return $this->full_names;
168 }
bool $full_names

References $full_names.

◆ getOnFirstField()

arJoin::getOnFirstField ( )

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

105 : string
106 {
108 }
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 115 of file class.arJoin.php.

115 : string
116 {
118 }
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 125 of file class.arJoin.php.

125 : string
126 {
127 return $this->operator;
128 }
string $operator

References $operator.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getTableName()

arJoin::getTableName ( )

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

135 : string
136 {
137 return $this->table_name;
138 }
string $table_name

References $table_name.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ getType()

arJoin::getType ( )

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

145 : string
146 {
147 return $this->type;
148 }
string $type

References $type.

Referenced by asStatementText().

+ Here is the caller graph for this function:

◆ isIsMapped()

arJoin::isIsMapped ( )

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

170 : bool
171 {
172 return $this->is_mapped;
173 }
bool $is_mapped

References $is_mapped.

◆ setBothExternal()

arJoin::setBothExternal ( bool  $both_external)

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

150 : void
151 {
152 $this->both_external = $both_external;
153 }

References $both_external.

◆ setFields()

arJoin::setFields ( array  $fields)
Parameters
mixed[]$fields

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

87 : void
88 {
89 $this->fields = $fields;
90 }

References $fields.

◆ setFullNames()

arJoin::setFullNames ( bool  $full_names)

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

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

References $full_names.

◆ setInner()

arJoin::setInner ( )

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

79 : void
80 {
81 $this->setType(self::TYPE_INNER);
82 }
setType(string $type)

References setType().

+ Here is the call graph for this function:

◆ setIsMapped()

arJoin::setIsMapped ( bool  $is_mapped)

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

175 : void
176 {
177 $this->is_mapped = $is_mapped;
178 }

References $is_mapped.

◆ setLeft()

arJoin::setLeft ( )

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

69 : void
70 {
71 $this->setType(self::TYPE_LEFT);
72 }

References setType().

+ Here is the call graph for this function:

◆ setOnFirstField()

arJoin::setOnFirstField ( string  $on_first_field)

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

100 : void
101 {
102 $this->on_first_field = $on_first_field;
103 }

References $on_first_field.

◆ setOnSecondField()

arJoin::setOnSecondField ( string  $on_second_field)

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

110 : void
111 {
112 $this->on_second_field = $on_second_field;
113 }

References $on_second_field.

◆ setOperator()

arJoin::setOperator ( string  $operator)

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

120 : void
121 {
122 $this->operator = $operator;
123 }

References $operator.

◆ setRght()

arJoin::setRght ( )

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

74 : void
75 {
76 $this->setType(self::TYPE_RIGHT);
77 }

References setType().

+ Here is the call graph for this function:

◆ setTableName()

arJoin::setTableName ( string  $table_name)

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

130 : void
131 {
132 $this->table_name = $table_name;
133 }

References $table_name.

◆ setType()

arJoin::setType ( string  $type)

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

140 : void
141 {
142 $this->type = $type;
143 }

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 39 of file class.arJoin.php.

Referenced by getBothExternal(), and setBothExternal().

◆ $fields

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

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

Referenced by getFields(), and setFields().

◆ $full_names

bool arJoin::$full_names = false
protected

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

Referenced by getFullNames(), and setFullNames().

◆ $is_mapped

bool arJoin::$is_mapped = false
protected

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

Referenced by isIsMapped(), and setIsMapped().

◆ $on_first_field

string arJoin::$on_first_field = ''
protected

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

Referenced by getOnFirstField(), and setOnFirstField().

◆ $on_second_field

string arJoin::$on_second_field = ''
protected

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

Referenced by getOnSecondField(), and setOnSecondField().

◆ $operator

string arJoin::$operator = '='
protected

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

Referenced by getOperator(), and setOperator().

◆ $table_name

string arJoin::$table_name = ''
protected

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

Referenced by getTableName(), and setTableName().

◆ $type

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

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

Referenced by getType(), and setType().

◆ AS_TEXT

const arJoin::AS_TEXT = ' AS '

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

◆ TYPE_INNER

const arJoin::TYPE_INNER = 'INNER'

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

◆ TYPE_LEFT

const arJoin::TYPE_LEFT = 'LEFT'

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

◆ TYPE_NORMAL

const arJoin::TYPE_NORMAL = self::TYPE_INNER

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

◆ TYPE_RIGHT

const arJoin::TYPE_RIGHT = 'RIGHT'

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


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