/**
* Initializes a new <tt>BasicEntityPersister</tt> that uses the given EntityManager
* and persists instances of the class described by the given ClassMetadata descriptor.
*/ publicfunction__construct(EntityManagerInterface $em, ClassMetadata $class) { $this->em = $em; $this->class = $class; $this->conn = $em->getConnection(); $this->platform = $this->conn->getDatabasePlatform(); $this->quoteStrategy = $em->getConfiguration()->getQuoteStrategy(); $this->identifierFlattener = newIdentifierFlattener($em->getUnitOfWork(), $em->getMetadataFactory()); $this->noLimitsContext = $this->currentPersisterContext = newCachedPersisterContext( $class, new Query\ResultSetMapping(), false ); $this->limitsHandlingContext = newCachedPersisterContext( $class, new Query\ResultSetMapping(), true ); }