PHP Class Kdyby\Doctrine\EntityRepository

The first and only rule with EntityRepository is not to ever inherit them, ever. The only valid reason to inherit EntityRepository is to add more common methods to all EntityRepositories in application, when you're creating your own framework (but do we really need to go any deeper than this?).
Author: Filip Procházka ([email protected])
Inheritance: extends Doctrine\ORM\EntityRepository, implements Kdyby\Persistence\QueryExecutor, implements Kdyby\Persistence\Queryable
Afficher le fichier Open project: kdyby/doctrine Class Usage Examples

Méthodes publiques

Méthode Description
__call ( string $name, array $args ) : mixed Call to undefined method.
__callStatic ( string $name, array $args ) : mixed Call to undefined static method.
__get ( string $name ) : mixed Returns property value. Do not call directly.
__isset ( string $name ) : boolean Is property defined?
__set ( string $name, mixed $value ) : void Sets value of a property. Do not call directly.
__unset ( string $name ) : void Access to undeclared property.
countBy ( array $criteria = [] ) : integer
createNativeQuery ( string $sql, Doctrine\ORM\Query\ResultSetMapping $rsm ) : Doctrine\ORM\NativeQuery
createQuery ( string $dql = NULL ) : Doctrine\ORM\Query
createQueryBuilder ( string $alias = NULL, string $indexBy = NULL ) : Kdyby\Doctrine\QueryBuilder
extensionMethod ( $name, null $callback = NULL ) : callable | null Adding method to class.
fetch ( Kdyby\Persistence\Query $queryObject, integer $hydrationMode = AbstractQuery::HYDRATE_OBJECT ) : array | ResultSet
fetchOne ( Kdyby\Persistence\Query $queryObject ) : object
findAssoc ( array $criteria, string $key = NULL ) : array Fetches all records and returns an associative array indexed by key
findBy ( array $criteria, array $orderBy = null, $limit = null, $offset = null )
findOneBy ( array $criteria, array $orderBy = null )
findPairs ( array $criteria, string $value = NULL, array $orderBy = [], string $key = NULL ) : array Fetches all records like $key => $value pairs
getClassMetadata ( ) : Kdyby\Doctrine\Mapping\ClassMetadata
getEntityManager ( ) : EntityManager
getReference ( integer | array $id ) : Doctrine\ORM\Proxy\Proxy
getReflection ( ) : ClassType Access to reflection.
related ( string $relation ) : EntityRepository

Private Methods

Méthode Description
criteriaRequiresDql ( array $criteria ) : boolean
handleException ( Exception $e, Doctrine\ORM\Query $query = NULL, string $message = NULL )
handleQueryException ( Exception $e, Kdyby\Persistence\Query $queryObject )

Method Details

__call() public méthode

Call to undefined method.
public __call ( string $name, array $args ) : mixed
$name string
$args array
Résultat mixed

__callStatic() public static méthode

Call to undefined static method.
public static __callStatic ( string $name, array $args ) : mixed
$name string
$args array
Résultat mixed

__get() public méthode

Returns property value. Do not call directly.
public __get ( string $name ) : mixed
$name string
Résultat mixed

__isset() public méthode

Is property defined?
public __isset ( string $name ) : boolean
$name string
Résultat boolean

__set() public méthode

Sets value of a property. Do not call directly.
public __set ( string $name, mixed $value ) : void
$name string
$value mixed
Résultat void

__unset() public méthode

Access to undeclared property.
public __unset ( string $name ) : void
$name string
Résultat void

countBy() public méthode

public countBy ( array $criteria = [] ) : integer
$criteria array
Résultat integer

createNativeQuery() public méthode

public createNativeQuery ( string $sql, Doctrine\ORM\Query\ResultSetMapping $rsm ) : Doctrine\ORM\NativeQuery
$sql string
$rsm Doctrine\ORM\Query\ResultSetMapping
Résultat Doctrine\ORM\NativeQuery

createQuery() public méthode

public createQuery ( string $dql = NULL ) : Doctrine\ORM\Query
$dql string
Résultat Doctrine\ORM\Query

createQueryBuilder() public méthode

public createQueryBuilder ( string $alias = NULL, string $indexBy = NULL ) : Kdyby\Doctrine\QueryBuilder
$alias string
$indexBy string The index for the from.
Résultat Kdyby\Doctrine\QueryBuilder

extensionMethod() public static méthode

Adding method to class.
public static extensionMethod ( $name, null $callback = NULL ) : callable | null
$name
$callback null
Résultat callable | null

fetch() public méthode

public fetch ( Kdyby\Persistence\Query $queryObject, integer $hydrationMode = AbstractQuery::HYDRATE_OBJECT ) : array | ResultSet
$queryObject Kdyby\Persistence\Query
$hydrationMode integer
Résultat array | ResultSet

fetchOne() public méthode

public fetchOne ( Kdyby\Persistence\Query $queryObject ) : object
$queryObject Kdyby\Persistence\Query
Résultat object

findAssoc() public méthode

Fetches all records and returns an associative array indexed by key
public findAssoc ( array $criteria, string $key = NULL ) : array
$criteria array
$key string
Résultat array

findBy() public méthode

public findBy ( array $criteria, array $orderBy = null, $limit = null, $offset = null )
$criteria array
$orderBy array

findOneBy() public méthode

public findOneBy ( array $criteria, array $orderBy = null )
$criteria array
$orderBy array

findPairs() public méthode

Fetches all records like $key => $value pairs
public findPairs ( array $criteria, string $value = NULL, array $orderBy = [], string $key = NULL ) : array
$criteria array parameter can be skipped
$value string mandatory
$orderBy array parameter can be skipped
$key string optional
Résultat array

getClassMetadata() public méthode

public getClassMetadata ( ) : Kdyby\Doctrine\Mapping\ClassMetadata
Résultat Kdyby\Doctrine\Mapping\ClassMetadata

getEntityManager() public méthode

public getEntityManager ( ) : EntityManager
Résultat EntityManager

getReference() public méthode

public getReference ( integer | array $id ) : Doctrine\ORM\Proxy\Proxy
$id integer | array
Résultat Doctrine\ORM\Proxy\Proxy

getReflection() public static méthode

Access to reflection.
public static getReflection ( ) : ClassType
Résultat Nette\Reflection\ClassType