ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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

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

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

45  {
46  $statement->setTableNameAs($this->getSaveTableName($statement));
47  $this->table_names[] = $statement->getTableName();
48  parent::add($statement);
49  }
setTableNameAs($table_name_as)
getSaveTableName(arJoin $statement)
add()
Definition: add.php:2
+ Here is the call graph for this function:

◆ asSQLStatement()

arJoinCollection::asSQLStatement ( )
Returns
string

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

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

56  {
57  $return = '';
58  if ($this->hasStatements()) {
59  foreach ($this->getJoins() as $join) {
60  $return .= $join->asSQLStatement($this->getAr());
61  }
62  }
63 
64  return $return;
65  }
+ Here is the call graph for this function:

◆ getJoins()

arJoinCollection::getJoins ( )
Returns
arJoin[]

Definition at line 72 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 25 of file class.arJoinCollection.php.

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

Referenced by add().

26  {
27  $table_name = $statement->getTableName();
28  if (in_array($table_name, $this->table_names)) {
29  $vals = array_count_values($this->table_names);
30  $next = $vals[$table_name] + 1;
31  $statement->setFullNames(true);
32  $statement->setIsMapped(true);
33 
34  return $table_name . '_' . $next;
35  } else {
36  return $table_name;
37  }
38  }
setIsMapped($is_mapped)
getTableName()
setFullNames($full_names)
+ 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 17 of file class.arJoinCollection.php.


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