ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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
 hasStatements ()
 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

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

Reimplemented from arStatementCollection.

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

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

{
$statement->setTableNameAs($this->getSaveTableName($statement));
$this->table_names[] = $statement->getTableName();
parent::add($statement);
}

+ Here is the call graph for this function:

arJoinCollection::asSQLStatement ( )
Returns
string

Reimplemented from arStatementCollection.

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

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

{
$return = '';
if ($this->hasStatements()) {
foreach ($this->getJoins() as $join) {
$return .= $join->asSQLStatement($this->getAr());
}
}
return $return;
}

+ Here is the call graph for this function:

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:

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().

{
$table_name = $statement->getTableName();
if (in_array($table_name, $this->table_names)) {
$vals = array_count_values($this->table_names);
$next = $vals[$table_name] + 1;
$statement->setFullNames(true);
$statement->setIsMapped(true);
return $table_name . '_' . $next;
} else {
return $table_name;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

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: