if (! class_exists($proxyClassName, false)) {
$fileName = $this->proxyGenerator->getProxyFileName($className);
switch ($this->autoGenerate) {
case self::AUTOGENERATE_NEVER:
require $fileName;
break;
case self::AUTOGENERATE_FILE_NOT_EXISTS:
if (! file_exists($fileName)) {
$this->proxyGenerator->generateProxyClass($classMetadata, $fileName);
*
* @throws OutOfBoundsException
*/
public function getProxy($className, array $identifier)
{
$definition = $this->definitions[$className] ?? $this->getProxyDefinition($className);
$fqcn = $definition->proxyClassName;
$proxy = new $fqcn($definition->initializer, $definition->cloner);
foreach ($definition->identifierFields as $idField) {
if (! isset($identifier[$idField])) {
* {@inheritDoc}
*/
public function getProxy($className, array $identifier)
{
if (! $this->isLazyGhostObjectEnabled) {
return parent::getProxy($className, $identifier);
}
$proxyFactory = $this->proxyFactories[$className] ?? $this->getProxyFactory($className);
return $proxyFactory($identifier);
$normalizedAssociatedId = $this->normalizeIdentifier($targetClass, $associatedId);
switch (true) {
// We are negating the condition here. Other cases will assume it is valid!
case $hints['fetchMode'][$class->name][$field] !== ClassMetadata::FETCH_EAGER:
$newValue = $this->em->getProxyFactory()->getProxy($assoc['targetEntity'], $normalizedAssociatedId);
$this->registerManaged($newValue, $associatedId, []);
break;
// Deferred eager load only works for single identifier classes
case isset($hints[self::HINT_DEFEREAGERLOAD]) &&
$this->registerManaged($this->_metadataCache[$className], $this->_hints[Query::HINT_REFRESH_ENTITY], $data);
}
$this->_hints['fetchAlias'] = $dqlAlias;
return $this->_uow->createEntity($className, $data, $this->_hints);
}
/**
* @param class-string $className
* @phpstan-param array<string, mixed> $data
if (! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || $this->_uow->isUninitializedObject($reflFieldValue)) {
// we only need to take action if this value is null,
// we refresh the entity or its an uninitialized proxy.
if (isset($nonemptyComponents[$dqlAlias])) {
$element = $this->getEntity($data, $dqlAlias);
$reflField->setValue($parentObject, $element);
$this->_uow->setOriginalEntityProperty($oid, $relationField, $element);
$targetClass = $this->_metadataCache[$relation['targetEntity']];
if ($relation['isOwningSide']) {
protected function hydrateAllData()
{
$result = [];
while ($row = $this->statement()->fetchAssociative()) {
$this->hydrateRowData($row, $result);
}
// Take snapshots from all newly initialized collections
foreach ($this->initializedCollections as $coll) {
$coll->takeSnapshot();
$this->_em->getEventManager()->addEventListener([Events::onClear], $this);
$this->prepare();
try {
$result = $this->hydrateAllData();
} finally {
$this->cleanup();
}
return $result;
$rsm = $this->getResultSetMapping();
if ($rsm === null) {
throw new LogicException('Uninitialized result set mapping.');
}
$data = $this->_em->newHydrator($this->_hydrationMode)->hydrateAll($stmt, $rsm, $this->_hints);
$setCacheEntry($data);
return $data;
}
{
if ($this->cacheable && $this->isCacheEnabled()) {
return $this->executeUsingQueryCache($parameters, $hydrationMode);
}
return $this->executeIgnoreQueryCache($parameters, $hydrationMode);
}
/**
* Execute query ignoring second level cache.
*
* @throws NonUniqueResultException
*/
public function getOneOrNullResult($hydrationMode = null)
{
try {
$result = $this->execute(null, $hydrationMode);
} catch (NoResultException $e) {
return null;
}
if ($this->_hydrationMode !== self::HYDRATE_SINGLE_SCALAR && ! $result) {
return $this->createQBL()
->andWhere('typeOffre.urn = :urn')
->setParameter('urn', $urn)
->orderBy('typeOffre.name', 'ASC')
->getQuery()
->getOneOrNullResult();
}
/**
* @return TypeOffre[]
*/
public function findByUrns(array $typesOffreData): array
{
$typesOffre = [];
foreach ($typesOffreData as $typeOffreId) {
try {
if (($typeOffre = $this->findOneByUrn($typeOffreId)) instanceof TypeOffre) {
$typesOffre[] = $typeOffre;
}
} catch (Exception) {
}
}
$urns = [];
foreach ($referringOffer->tags as $category) {
$urns[] = $category->urn;
}
foreach ($this->typeOffreRepository->findByUrns($urns) as $typeOffre) {
$filtres[] = $typeOffre;
}
if ($filtres === []) {
return [];
}
if (count($offerRefer->see_also)) {
$offres = $offerRefer->see_also;
} else {
$pivotRepository = PivotContainer::getPivotRepository();
$offres = $pivotRepository->fetchSameOffres($offerRefer, 10);
}
PostUtils::setLinkOnOffres($offres, $category->term_id, $language);
$recommandations = PostUtils::convertRecommandationsToArray($offres, $language);
$count = count($recommandations);
$data = [];
'name' => $category->labelByLanguage('fr'),
'url' => $urlCategoryAgenda.'?filtre='.$category->urn,
];
}
$recommandations = $wpRepository->recommandationsByOffre($offre, WpRepository::getCategoryAgenda(), 'fr');
$relations = [];
/*
RouterMarche::setRouteEvents($recommandations);
foreach ($recommandations as $item) {
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
Error
|
---|
Error: Failed opening required '/var/www/marchebe/var/cache/prod/doctrine/orm/Proxies/__CG__AcMarchePivotEntityTypeOffre.php' (include_path='.:/usr/share/php') at /var/www/marchebe/vendor/doctrine/common/src/Proxy/AbstractProxyFactory.php:199 at Doctrine\Common\Proxy\AbstractProxyFactory->getProxyDefinition() (/var/www/marchebe/vendor/doctrine/common/src/Proxy/AbstractProxyFactory.php:111) at Doctrine\Common\Proxy\AbstractProxyFactory->getProxy() (/var/www/marchebe/vendor/doctrine/orm/src/Proxy/ProxyFactory.php:208) at Doctrine\ORM\Proxy\ProxyFactory->getProxy() (/var/www/marchebe/vendor/doctrine/orm/src/UnitOfWork.php:3114) at Doctrine\ORM\UnitOfWork->createEntity() (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/ObjectHydrator.php:272) at Doctrine\ORM\Internal\Hydration\ObjectHydrator->getEntity() (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/ObjectHydrator.php:449) at Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateRowData() (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/ObjectHydrator.php:149) at Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateAllData() (/var/www/marchebe/vendor/doctrine/orm/src/Internal/Hydration/AbstractHydrator.php:272) at Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll() (/var/www/marchebe/vendor/doctrine/orm/src/AbstractQuery.php:1231) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache() (/var/www/marchebe/vendor/doctrine/orm/src/AbstractQuery.php:1172) at Doctrine\ORM\AbstractQuery->execute() (/var/www/marchebe/vendor/doctrine/orm/src/AbstractQuery.php:959) at Doctrine\ORM\AbstractQuery->getOneOrNullResult() (/var/www/marchebe/src/AcMarche/Pivot/src/Repository/TypeOffreRepository.php:146) at AcMarche\Pivot\Repository\TypeOffreRepository->findOneByUrn() (/var/www/marchebe/src/AcMarche/Pivot/src/Repository/TypeOffreRepository.php:112) at AcMarche\Pivot\Repository\TypeOffreRepository->findByUrns() (/var/www/marchebe/src/AcMarche/Pivot/src/Repository/PivotRepository.php:188) at AcMarche\Pivot\Repository\PivotRepository->fetchSameOffres() (/var/www/marchebe/wp-content/themes/marchebe/Lib/WpRepository.php:123) at AcMarche\Theme\Lib\WpRepository->recommandationsByOffre() (/var/www/marchebe/wp-content/themes/marchebe/single-event.php:112) at include('/var/www/marchebe/wp-content/themes/marchebe/single-event.php') (/var/www/marchebe/wp-includes/template-loader.php:106) at require_once('/var/www/marchebe/wp-includes/template-loader.php') (/var/www/marchebe/wp-blog-header.php:19) at require('/var/www/marchebe/wp-blog-header.php') (/var/www/marchebe/index.php:17) |