コード例 #1
0
 public function testConstruct()
 {
     $join = new JoinExpression($this->type, $this->table, $this->condition);
     $this->assertEquals($this->type, $join->getType());
     $this->assertEquals($this->table, $join->getTable());
     $this->assertEquals($this->condition, $join->getCondition());
 }
コード例 #2
0
 /**
  * Add a join to this table
  * @param JoinExpression $join
  * @return null
  */
 public function addJoin(JoinExpression $join)
 {
     $table = $join->getTable();
     $alias = $table->getAlias();
     if (empty($alias)) {
         $alias = $table->getName();
     }
     $this->joins[$alias] = $join;
 }