src/Core/Db/Factory/DbFactory.php
public function builder(StatementInterface $statement)
	{
		if($statement instanceof Insert)
		{
			return new InsertBuilder($statement);
		}
		/** @var ExpressionBuilderFactoryInterface $factory */
		$factory = $this->expression('BuilderFactory');

		if($statement instanceof Select)
		{
			return new SelectBuilder($statement, $factory);
		}
		elseif($statement instanceof Update)
		{
			return new UpdateBuilder($statement, $factory);
		}
		else
		{
			/** @var Delete $statement */
			return new DeleteBuilder($statement, $factory);
		}
	}
public function builder(StatementInterface $statement)
	{
		if($statement instanceof Insert)
		{
			return new InsertBuilder($statement);
		}
		/** @var ExpressionBuilderFactoryInterface $factory */
		$factory = $this->expression('BuilderFactory');

		if($statement instanceof Select)
		{
			return new SelectBuilder($statement, $factory);
		}
		elseif($statement instanceof Update)
		{
			return new UpdateBuilder($statement, $factory);
		}
		else
		{
			/** @var Delete $statement */
			return new DeleteBuilder($statement, $factory);
		}
	}
public function builder ( StatementInterface $ statement ) { if ( $ statement instanceof Insert ) { return new InsertBuilder ( $ statement ) ; } /** @var ExpressionBuilderFactoryInterface $factory */ $ factory = $ this -> expression ( 'BuilderFactory' ) ; if ( $ statement instanceof Select ) { return new SelectBuilder ( $ statement , $ factory ) ; } elseif ( $ statement instanceof Update ) { return new UpdateBuilder ( $ statement , $ factory ) ; } else { /** @var Delete $statement */ return new DeleteBuilder ( $ statement , $ factory ) ; } }
Create an instance of a query builder.
Different between the several statement types and return the correct query builder for the passed statement.

@param StatementInterface $statement The statement value object, from which should the a query build.

@return DeleteBuilder|InsertBuilder|SelectBuilder|UpdateBuilder    An instance of QueryBuilder,
switched by the passed argument.
Create an instance of a query builder . Different between the several statement types and return the correct query builder for the passed statement .