PHP Класс FactoryGirl\Provider\Doctrine\ORM\QueryBuilder

Наследование: extends Doctrine\ORM\QueryBuilder
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_queryConfigurers array
$_statuses
$entityAlias string Entity alias associated with this query builder (if any)
$entityName string Entity name associated with this query builder (if any)

Открытые методы

Метод Описание
__construct ( EntityManager $em, string $entityName = null, string $entityAlias = null )
_configureQuery ( callback(Doctrine\ORM\Query) $configurer ) : QueryBuilder NOTE: Should be protected
create ( EntityManager $em ) : QueryBuilder Create a new QueryBuilder of the type that receives this static call.
getQuery ( ) : Doctrine\ORM\Query Configures the created Query using the configurers added to this builder
init ( ) Post-construction template method

Защищенные методы

Метод Описание
asPartial ( ) : QueryBuilder Configures the query to force result objects to be partially loaded
ensure ( string $status, callback(QueryBuilder) $operation ) : QueryBuilder Ensure that a certain operation has been performed on this object.

Описание методов

__construct() публичный Метод

public __construct ( EntityManager $em, string $entityName = null, string $entityAlias = null )
$em Doctrine\ORM\EntityManager
$entityName string
$entityAlias string

_configureQuery() публичный Метод

NOTE: Should be protected
public _configureQuery ( callback(Doctrine\ORM\Query) $configurer ) : QueryBuilder
$configurer callback(Doctrine\ORM\Query)
Результат QueryBuilder

asPartial() защищенный Метод

Configures the query to force result objects to be partially loaded
protected asPartial ( ) : QueryBuilder
Результат QueryBuilder

create() публичный статический Метод

Create a new QueryBuilder of the type that receives this static call.
public static create ( EntityManager $em ) : QueryBuilder
$em Doctrine\ORM\EntityManager
Результат QueryBuilder

ensure() защищенный Метод

$status is a string that describes state the operation should affect and $operation is a callback which is executed if and only if the status is not already in effect. Example: public function withProduct() { return $this->ensure('product is joined', function($qb) { $qb->join('pv.product', 'p'); }); } Should be used to allow the possibility of several different methods each wanting to affect a certain state without messing up the query by duplicate calls to methods. Has the pleasant side effect of describing the results of operations on a more intimate level than the plain object API can allow for, making for more self-documenting code.
protected ensure ( string $status, callback(QueryBuilder) $operation ) : QueryBuilder
$status string
$operation callback(QueryBuilder)
Результат QueryBuilder

getQuery() публичный Метод

Configures the created Query using the configurers added to this builder
public getQuery ( ) : Doctrine\ORM\Query
Результат Doctrine\ORM\Query

init() публичный Метод

Prepopulates with entity if both entity name and alias are set.
public init ( )

Описание свойств

$_queryConfigurers защищенное свойство

protected array $_queryConfigurers
Результат array

$_statuses защищенное свойство

protected $_statuses

$entityAlias защищенное свойство

Entity alias associated with this query builder (if any)
protected string $entityAlias
Результат string

$entityName защищенное свойство

Entity name associated with this query builder (if any)
protected string $entityName
Результат string