Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CachedPersisterContext example
public
function
__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 =
new
IdentifierFlattener
(
$em
->
getUnitOfWork
(
)
,
$em
->
getMetadataFactory
(
)
)
;
$this
->noLimitsContext =
$this
->currentPersisterContext =
new
CachedPersisterContext
(
$class
,
new
Query\
ResultSetMapping
(
)
,
false
)
;
$this
->limitsHandlingContext =
new
CachedPersisterContext
(
$class
,
new
Query\
ResultSetMapping
(
)
,
true
)
;
}