ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
arJoinCollection Class Reference

Class arJoinCollection. More...

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

Public Member Functions

 getSaveTableName (arJoin $statement)
 
 add (arStatement $statement)
 
 asSQLStatement ()
 
 asORACLEStatement ()
 
 getJoins ()
 
- Public Member Functions inherited from arStatementCollection
 add (arStatement $statement)
 
 hasStatements ()
 
 asSQLStatement ()
 
 asORACLEStatement ()
 
 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 42 of file class.arJoinCollection.php.

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

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

◆ asORACLEStatement()

arJoinCollection::asORACLEStatement ( )
Returns
string

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

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

67  {
68  $return = '';
69  if ($this->hasStatements()) {
70  foreach ($this->getJoins() as $join) {
71  $return .= $join->asORACLEStatement($this->getAr());
72  }
73  }
74 
75  return $return;
76  }
+ Here is the call graph for this function:

◆ asSQLStatement()

arJoinCollection::asSQLStatement ( )
Returns
string

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

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

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  }
+ Here is the call graph for this function:

◆ getJoins()

arJoinCollection::getJoins ( )
Returns
arJoin[]

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

References arStatementCollection\$statements.

Referenced by asORACLEStatement(), and 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.

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

Referenced by add().

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)
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 16 of file class.arJoinCollection.php.


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