*/
public function getProxy($className, array $identifier)
{
$definition = isset($this->definitions[$className])
? $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])) {
default:
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'], $associatedId);
break;
// Deferred eager load only works for single identifier classes
case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite):
// TODO: Is there a faster approach?
if (isset($this->_hints[Query::HINT_REFRESH_ENTITY])) {
$this->registerManaged($this->class, $this->_hints[Query::HINT_REFRESH_ENTITY], $data);
}
$uow = $this->_em->getUnitOfWork();
$entity = $uow->createEntity($entityName, $data, $this->_hints);
$result[] = $entity;
if (isset($this->_hints[Query::HINT_INTERNAL_ITERATION]) && $this->_hints[Query::HINT_INTERNAL_ITERATION]) {
$this->_uow->hydrationComplete();
$hints[Query::HINT_REFRESH] = true;
$hints[Query::HINT_REFRESH_ENTITY] = $entity;
}
$hydrator = $this->em->newHydrator($this->currentPersisterContext->selectJoinSql ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
$entities = $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, $hints);
return $entities ? $entities[0] : null;
}
/**
$session = $request->getSession();
$em = $this->getDoctrine()->getManager();
$producto = $em->getRepository('MediadivAdminBundle:Productos')->findOneby(array('id' => $id));
$imagenes = $producto->getImagenes();
$categoria = $producto->getCategoriasshop();
$tags = $producto->getTags();
$tallas = $em->getRepository('MediadivAdminBundle:Tallas')->findBy(array('productos' => $producto ));
$token = $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue();
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
No log messages
ContextErrorException |
---|
Symfony\Component\Debug\Exception\ContextErrorException: Warning: file_put_contents(/var/www/html/prizmu/var/cache/prod/doctrine/orm/Proxies/__CG__MediadivAdminBundleEntityCategoriasShop.php.6606a5e68201a7.48733805): failed to open stream: No space left on device at vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php:304 at Doctrine\Common\Proxy\ProxyGenerator->generateProxyClass(object(ClassMetadata), '/var/www/html/prizmu/var/cache/prod/doctrine/orm/Proxies/__CG__MediadivAdminBundleEntityCategoriasShop.php') (vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:220) at Doctrine\Common\Proxy\AbstractProxyFactory->getProxyDefinition('Mediadiv\\AdminBundle\\Entity\\CategoriasShop') (vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:119) at Doctrine\Common\Proxy\AbstractProxyFactory->getProxy('Mediadiv\\AdminBundle\\Entity\\CategoriasShop', array('id' => 30)) (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2707) at Doctrine\ORM\UnitOfWork->createEntity('Mediadiv\\AdminBundle\\Entity\\Productos', array('id' => 404, 'nombre' => 'Neon Jaguar Pixel', 'material' => null, 'precio' => '250', 'descripcion' => '<span style="color: rgb(68, 68, 68); font-family: Arial, Helvetica, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);">Mini canvas series 15 x 15 cm by Prizmu. Acrylic on canvas. 2021. (1/1 one original)</span><br>', 'cuidado' => '<br>', 'codigo' => null, 'destacado' => null, 'tipodespacho' => 'paquete', 'principalf' => '36.jpg', 'hoverf' => '35.jpg', 'categoriasshop_id' => 30, 'segmento_id' => 7, 'estados_id' => 1), array('fetchMode' => array('Mediadiv\AdminBundle\Entity\Productos' => array('categoriasshop' => 2)))) (vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:147) at Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateRowData(array('id_1' => '404', 'nombre_2' => 'Neon Jaguar Pixel', 'material_3' => null, 'precio_4' => '250', 'descripcion_5' => '<span style="color: rgb(68, 68, 68); font-family: Arial, Helvetica, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);">Mini canvas series 15 x 15 cm by Prizmu. Acrylic on canvas. 2021. (1/1 one original)</span><br>', 'cuidado_6' => '<br>', 'codigo_7' => null, 'destacado_8' => null, 'tipodespacho_9' => 'paquete', 'principalf_10' => '36.jpg', 'hoverf_11' => '35.jpg', 'categoriasshop_id_12' => '30', 'segmento_id_13' => '7', 'estados_id_14' => '1'), array()) (vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:69) at Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateAllData() (vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php:150) at Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll(object(PDOStatement), object(ResultSetMapping), array()) (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:720) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load(array('id' => '404'), null, null, array(), null, 1, null) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:196) at Doctrine\ORM\EntityRepository->findOneBy(array('id' => '404')) (src/Mediadiv/HomeBundle/Controller/DefaultController.php:672) at Mediadiv\HomeBundle\Controller\DefaultController->detalleProductoAction(object(Request), '404', 'Neon%20Jaguar%20Pixel') (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:169) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (web/app.php:22) |