*/
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.6606bc8ad3bc19.58230033): 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' => 20)) (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2707) at Doctrine\ORM\UnitOfWork->createEntity('Mediadiv\\AdminBundle\\Entity\\Productos', array('id' => 239, 'nombre' => 'Big star. Random sticker pack', 'material' => null, 'precio' => '30', 'descripcion' => 'This is a random pack for sticker art collectors. The sizes are between 9,5 x 9,5 to 20 x 11 cm. You will receive 6 different designs. Hand cutted. Digitally printed on a PVC paper for exteriors. This is not an industrial print. This series is closed so that means that some of the designs will not be printed again (or in the same way). Random means that not necessary you will receive the sticker on the picture but also you can receive a sticker that is not on the online catalogue. There are more than 300 motives and everyday I am working on new ones.<br>', 'cuidado' => '<br>', 'codigo' => null, 'destacado' => null, 'tipodespacho' => 'carta', 'principalf' => 'stiker primera tirada peke_0046_Layer 9.jpg', 'hoverf' => 'stiker primera tirada peke_0047_Layer 55.jpg', 'categoriasshop_id' => 20, 'segmento_id' => 2, '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' => '239', 'nombre_2' => 'Big star. Random sticker pack', 'material_3' => null, 'precio_4' => '30', 'descripcion_5' => 'This is a random pack for sticker art collectors. The sizes are between 9,5 x 9,5 to 20 x 11 cm. You will receive 6 different designs. Hand cutted. Digitally printed on a PVC paper for exteriors. This is not an industrial print. This series is closed so that means that some of the designs will not be printed again (or in the same way). Random means that not necessary you will receive the sticker on the picture but also you can receive a sticker that is not on the online catalogue. There are more than 300 motives and everyday I am working on new ones.<br>', 'cuidado_6' => '<br>', 'codigo_7' => null, 'destacado_8' => null, 'tipodespacho_9' => 'carta', 'principalf_10' => 'stiker primera tirada peke_0046_Layer 9.jpg', 'hoverf_11' => 'stiker primera tirada peke_0047_Layer 55.jpg', 'categoriasshop_id_12' => '20', 'segmento_id_13' => '2', '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' => '239'), null, null, array(), null, 1, null) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:196) at Doctrine\ORM\EntityRepository->findOneBy(array('id' => '239')) (src/Mediadiv/HomeBundle/Controller/DefaultController.php:672) at Mediadiv\HomeBundle\Controller\DefaultController->detalleProductoAction(object(Request), '239', 'Big star. Random sticker pack') (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) |