Hoa central
Public Member Functions | Protected Attributes | List of all members
Hoa\Database\Query\Join Class Reference

Public Member Functions

 __construct (Select $parent, Array &$from)
 
 on ($expression)
 
 using ($expression)
 

Protected Attributes

 $_parent = null
 
 $_from = null
 

Detailed Description

Class .

Build a JOIN clause.

Definition at line 47 of file Join.php.

Constructor & Destructor Documentation

Hoa\Database\Query\Join::__construct ( Select  $parent,
Array &  $from 
)

Constructor.

Parameters
\Hoa\Database\Query\Select$parentParent query.
string$fromFROM entry (“friends”).
Returns
void

Definition at line 72 of file Join.php.

73  {
74  $this->_parent = $parent;
75  $this->_from = &$from;
76  end($this->_from);
77 
78  return;
79  }

Member Function Documentation

Hoa\Database\Query\Join::on (   $expression)

Declare the JOIN constraint ON.

Parameters
string$expressionExpression.
Returns

Definition at line 87 of file Join.php.

88  {
89  $this->_from[key($this->_from)] =
90  current($this->_from) .
91  ' ON ' . $expression;
92 
93  return $this->_parent;
94  }
Hoa\Database\Query\Join::using (   $expression)

Declare the JOIN constraint USING.

Parameters
string$expressionExpression.
......
Returns

Definition at line 103 of file Join.php.

104  {
105  $this->_from[key($this->_from)] =
106  current($this->_from) .
107  ' USING (' .
108  implode(', ', func_get_args()) . ')';
109 
110  return $this->_parent;
111  }

Member Data Documentation

Hoa\Database\Query\Join::$_from = null
protected

Definition at line 61 of file Join.php.

Hoa\Database\Query\Join::$_parent = null
protected

Definition at line 54 of file Join.php.


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