PHP Class Kdyby\Doctrine\EntityManager

Author: Filip Procházka ([email protected])
Inheritance: extends Doctrine\ORM\EntityManager, implements Kdyby\Persistence\QueryExecutor, implements Kdyby\Persistence\Queryable
Mostrar archivo Open project: kdyby/doctrine Class Usage Examples

Public Methods

Method 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.
bindTracyPanel ( Kdyby\Doctrine\Diagnostics\Panel $panel )
clear ( $entityName = null ) : EntityManager
close ( )
create ( Doctrine\DBAL\Connection | array $conn, Doctrine\ORM\Configuration $config, Doctrine\Common\EventManager $eventManager = NULL ) : EntityManager Factory method to create EntityManager instances.
createQueryBuilder ( $alias = NULL, $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 | null
flush ( object | array $entity = null ) : EntityManager
getReflection ( ) : ClassType Access to reflection.
newHydrator ( integer $hydrationMode ) : Doctrine\ORM\Internal\Hydration\AbstractHydrator
persist ( object | array $entity ) : EntityManager
remove ( object | array $entity ) : EntityManager
safePersist ( $entity ) : boolean | object Tries to persist the given entity and returns FALSE if an unique constaint was violated.

Protected Methods

Method Description
__construct ( Doctrine\DBAL\Connection $conn, Doctrine\ORM\Configuration $config, Doctrine\Common\EventManager $eventManager )

Private Methods

Method Description
handleQueryException ( Exception $e, Kdyby\Persistence\Query $queryObject )

Method Details

__call() public method

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

__callStatic() public static method

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

__construct() protected method

protected __construct ( Doctrine\DBAL\Connection $conn, Doctrine\ORM\Configuration $config, Doctrine\Common\EventManager $eventManager )
$conn Doctrine\DBAL\Connection
$config Doctrine\ORM\Configuration
$eventManager Doctrine\Common\EventManager

__get() public method

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

__isset() public method

Is property defined?
public __isset ( string $name ) : boolean
$name string
return boolean

__set() public method

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

__unset() public method

Access to undeclared property.
public __unset ( string $name ) : void
$name string
return void

bindTracyPanel() public method

public bindTracyPanel ( Kdyby\Doctrine\Diagnostics\Panel $panel )
$panel Kdyby\Doctrine\Diagnostics\Panel

clear() public method

public clear ( $entityName = null ) : EntityManager
return EntityManager

close() public method

public close ( )

create() public static method

Factory method to create EntityManager instances.
public static create ( Doctrine\DBAL\Connection | array $conn, Doctrine\ORM\Configuration $config, Doctrine\Common\EventManager $eventManager = NULL ) : EntityManager
$conn Doctrine\DBAL\Connection | array
$config Doctrine\ORM\Configuration
$eventManager Doctrine\Common\EventManager
return EntityManager

createQueryBuilder() public method

public createQueryBuilder ( $alias = NULL, $indexBy = NULL ) : Kdyby\Doctrine\QueryBuilder
return Kdyby\Doctrine\QueryBuilder

extensionMethod() public static method

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

fetch() public method

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

fetchOne() public method

public fetchOne ( Kdyby\Persistence\Query $queryObject ) : object | null
$queryObject Kdyby\Persistence\Query
return object | null

flush() public method

public flush ( object | array $entity = null ) : EntityManager
$entity object | array
return EntityManager

getReflection() public static method

Access to reflection.
public static getReflection ( ) : ClassType
return Nette\Reflection\ClassType

newHydrator() public method

public newHydrator ( integer $hydrationMode ) : Doctrine\ORM\Internal\Hydration\AbstractHydrator
$hydrationMode integer
return Doctrine\ORM\Internal\Hydration\AbstractHydrator

persist() public method

public persist ( object | array $entity ) : EntityManager
$entity object | array
return EntityManager

remove() public method

public remove ( object | array $entity ) : EntityManager
$entity object | array
return EntityManager

safePersist() public method

Warning: On success you must NOT use the passed entity further in your application. Use the returned one instead!
public safePersist ( $entity ) : boolean | object
$entity
return boolean | object