ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
arJoinCollection Class Reference

Class arJoinCollection. More...

+ Inheritance diagram for arJoinCollection:
+ Collaboration diagram for arJoinCollection:

Public Member Functions

 getSaveTableName (arJoin $statement)
 
 add (arStatement $statement)
 
 asSQLStatement ()
 
 getJoins ()
 
- Public Member Functions inherited from arStatementCollection
 add (arStatement $statement)
 
 hasStatements ()
 
 asSQLStatement ()
 
 setAr ($ar)
 
 getAr ()
 
 setStatements ($statements)
 
 getStatements ()
 

Protected Attributes

 $table_names = array()
 
- Protected Attributes inherited from arStatementCollection
 $statements = array()
 
 $ar
 

Additional Inherited Members

- Static Protected Attributes inherited from arStatementCollection
static $cache = array()
 

Detailed Description

Class arJoinCollection.

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.arJoinCollection.php.

Member Function Documentation

◆ add()

arJoinCollection::add ( arStatement  $statement)
Parameters
arStatement$statement

Reimplemented from arStatementCollection.

Definition at line 42 of file class.arJoinCollection.php.

42 {
43 $statement->setTableNameAs($this->getSaveTableName($statement));
44 $this->table_names[] = $statement->getTableName();
45 parent::add($statement);
46 }
getSaveTableName(arJoin $statement)
setTableNameAs($table_name_as)

References getSaveTableName(), and arStatement\setTableNameAs().

+ Here is the call graph for this function:

◆ asSQLStatement()

arJoinCollection::asSQLStatement ( )
Returns
string

Reimplemented from arStatementCollection.

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

52 {
53 $return = '';
54 if ($this->hasStatements()) {
55 foreach ($this->getJoins() as $join) {
56 $return .= $join->asSQLStatement($this->getAr());
57 }
58 }
59
60 return $return;
61 }

References arStatementCollection\getAr(), getJoins(), and arStatementCollection\hasStatements().

+ Here is the call graph for this function:

◆ getJoins()

arJoinCollection::getJoins ( )
Returns
arJoin[]

Definition at line 67 of file class.arJoinCollection.php.

References arStatementCollection\$statements.

Referenced by asSQLStatement().

+ Here is the caller graph for this function:

◆ getSaveTableName()

arJoinCollection::getSaveTableName ( arJoin  $statement)
Parameters
arJoin$statement
Returns
string

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

24 {
25 $table_name = $statement->getTableName();
26 if (in_array($table_name, $this->table_names)) {
27 $vals = array_count_values($this->table_names);
28 $next = $vals[$table_name] + 1;
29 $statement->setFullNames(true);
30 $statement->setIsMapped(true);
31
32 return $table_name . '_' . $next;
33 } else {
34 return $table_name;
35 }
36 }
setIsMapped($is_mapped)
setFullNames($full_names)
getTableName()

References arJoin\getTableName(), arJoin\setFullNames(), and arJoin\setIsMapped().

Referenced by add().

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

Field Documentation

◆ $table_names

arJoinCollection::$table_names = array()
protected

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


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