DebugUnitOfWorkListener
in package
Use this logger to dump the identity map during the onFlush event. This is useful for debugging weird UnitOfWork behavior with complex operations.
Table of Contents
- $context : string
- $file : string
- __construct() : mixed
- Pass a stream and context information for the debugging session.
- dumpIdentityMap() : void
- Dumps the contents of the identity map into a stream.
- onFlush() : void
- getIdString() : string
- getType() : string
Properties
$context
private
string
$context
$file
private
string
$file
Methods
__construct()
Pass a stream and context information for the debugging session.
public
__construct([string $file = 'php://output' ][, string $context = '' ]) : mixed
The stream can be php://output to print to the screen.
Parameters
- $file : string = 'php://output'
- $context : string = ''
Return values
mixed —dumpIdentityMap()
Dumps the contents of the identity map into a stream.
public
dumpIdentityMap(EntityManagerInterface $em) : void
Parameters
- $em : EntityManagerInterface
Return values
void —onFlush()
public
onFlush(OnFlushEventArgs $args) : void
Parameters
- $args : OnFlushEventArgs
Return values
void —getIdString()
private
getIdString(object $entity, UnitOfWork $uow) : string
Parameters
- $entity : object
- $uow : UnitOfWork
Return values
string —getType()
private
getType(mixed $var) : string
Parameters
- $var : mixed