protected function doJoin($type, array $args)
    {
        if (count($args) === 0) {
            throw new QueryException('No arguments given');
        }

        $tableName = $args[0];
        $condition = '';

        if (count($args) == 2) {
            $condition = $args[1];
        } elseif (count($args) == 3) {
            $condition = $args[1] . ' = ' . $args[2];
        }

        $this->parts['from'][] = array(
            'table' => $tableName,
            'type' => $type,
            'condition' => $condition,
        );

        return $this;
    }
protected function doJoin($type, array $args)
    {
        if (count($args) === 0) {
            throw new QueryException('No arguments given');
        }

        $tableName = $args[0];
        $condition = '';

        if (count($args) == 2) {
            $condition = $args[1];
        } elseif (count($args) == 3) {
            $condition = $args[1] . ' = ' . $args[2];
        }

        $this->parts['from'][] = array(
            'table' => $tableName,
            'type' => $type,
            'condition' => $condition,
        );

        return $this;
    }
protected function doJoin ( $ type , array $ args ) { if ( count ( $ args ) === 0 ) { throw new QueryException ( 'No arguments given' ) ; } $ tableName = $ args [ 0 ] ; $ condition = '' ; if ( count ( $ args ) == 2 ) { $ condition = $ args [ 1 ] ; } elseif ( count ( $ args ) == 3 ) { $ condition = $ args [ 1 ] . ' = ' . $ args [ 2 ] ; } $ this -> parts [ 'from' ] [ ] = array ( 'table' => $ tableName , 'type' => $ type , 'condition' => $ condition , ) ; return $ this ; }
Helper function to generate join.

@param string $type
@param array $args

@return \eZ\Publish\Core\Persistence\Database\SelectQuery
Helper function to generate join .