abstract class DoctrineCommand extends Command (View source)

Base class for Doctrine console commands to extend from.

Methods

__construct(ManagerRegistry $doctrine = null)

No description

setContainer(ContainerInterface $container = null) deprecated

No description

ContainerInterface
getContainer() deprecated

No description

EntityGenerator
getEntityGenerator()

get a doctrine entity generator

EntityManager
getEntityManager(string $name, int|null $shardId = null)

Get a doctrine entity manager by symfony name.

Connection
getDoctrineConnection(string $name)

Get a doctrine dbal connection by symfony name.

ManagerRegistry
getDoctrine()

No description

Details

__construct(ManagerRegistry $doctrine = null)

Parameters

ManagerRegistry $doctrine

setContainer(ContainerInterface $container = null) deprecated

deprecated

Parameters

ContainerInterface $container

protected ContainerInterface getContainer() deprecated

deprecated

Return Value

ContainerInterface

Exceptions

LogicException

protected EntityGenerator getEntityGenerator()

get a doctrine entity generator

Return Value

EntityGenerator

protected EntityManager getEntityManager(string $name, int|null $shardId = null)

Get a doctrine entity manager by symfony name.

Parameters

string $name
int|null $shardId

Return Value

EntityManager

protected Connection getDoctrineConnection(string $name)

Get a doctrine dbal connection by symfony name.

Parameters

string $name

Return Value

Connection

protected ManagerRegistry getDoctrine()

Return Value

ManagerRegistry