PHP Class Blast\Orm\Connection

Inheritance: extends Doctrine\DBAL\Connection, implements Blast\Orm\MapperFactoryInterface, implements Blast\Orm\QueryFactoryInterface, use trait MapperFactoryTrait
Show file Open project: phpthinktank/blast-orm

Public Methods

Method Description
__construct ( array $params, Doctrine\DBAL\Driver $driver, $config, $eventManager )
createMapper ( $entity ) : Mapper Factory method for create a new Mapper for given entity.
createQuery ( $entity = null, Doctrine\DBAL\Query\QueryBuilder $builder = null ) : Query Factory method for create a new query for given entity with optional custom query builder.
getMetaDataCache ( ) : Doctrine\Common\Cache\Cache | null
getPrefix ( ) : null | string
getReflectionCache ( ) : Doctrine\Common\Cache\Cache | null
setPrefix ( null | string $prefix )

Protected Methods

Method Description
internalCreateMapper ( )

Private Methods

Method Description
getInternalCache ( )

Method Details

__construct() public method

public __construct ( array $params, Doctrine\DBAL\Driver $driver, $config, $eventManager )
$params array
$driver Doctrine\DBAL\Driver

createMapper() public method

* php create mapper from connection $connection->createMapper(Post::class);
public createMapper ( $entity ) : Mapper
$entity
return Mapper

createQuery() public method

Factory method for create a new query for given entity with optional custom query builder.
public createQuery ( $entity = null, Doctrine\DBAL\Query\QueryBuilder $builder = null ) : Query
$entity
$builder Doctrine\DBAL\Query\QueryBuilder
return Query

getMetaDataCache() public method

public getMetaDataCache ( ) : Doctrine\Common\Cache\Cache | null
return Doctrine\Common\Cache\Cache | null

getPrefix() public method

public getPrefix ( ) : null | string
return null | string

getReflectionCache() public method

public getReflectionCache ( ) : Doctrine\Common\Cache\Cache | null
return Doctrine\Common\Cache\Cache | null

internalCreateMapper() protected method

protected internalCreateMapper ( )

setPrefix() public method

public setPrefix ( null | string $prefix )
$prefix null | string