PHP 클래스 FactoryGirl\Provider\Doctrine\ORM\QueryBuilder

상속: extends Doctrine\ORM\QueryBuilder
파일 보기 프로젝트 열기: breerly/factory-girl-php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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