/** * @covers ::getParameters * @dataProvider dataGetParameters */ public function testGetParameters($table, $condition, $expected) { $join = new SQL\Join($table, $condition); $this->assertSame($expected, $join->getParameters()); }
/** * Render a Join object * * @param SQL\Join $join * @return string */ public static function render(SQL\Join $join) { $condition = $join->getCondition(); $table = $join->getTable(); return Compiler::expression(array($join->getType(), 'JOIN', $table instanceof SQL\Aliased ? Aliased::render($table) : $table, is_array($condition) ? self::renderArrayCondition($condition) : $condition)); }