*/
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;
}
/**
public function categoriasAction(Request $request , $id , $idsegmento , $segmento ,$categoria){
$em = $this->getDoctrine()->getManager();
$categoria = $em->getRepository('MediadivAdminBundle:CategoriasShop')->findOneBy(array('id' => $id ));
$segmento = $em->getRepository('MediadivAdminBundle:Segmento')->findOneby(array('id' => $idsegmento));
$session = $request->getSession();
$datos = $this->datos($request, $em, $session);
$token = $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue();
$breadCump1 = '';
$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__MediadivAdminBundleEntityEstados.php.6606a58ac873e4.85306869): 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__MediadivAdminBundleEntityEstados.php') (vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:220) at Doctrine\Common\Proxy\AbstractProxyFactory->getProxyDefinition('Mediadiv\\AdminBundle\\Entity\\Estados') (vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:119) at Doctrine\Common\Proxy\AbstractProxyFactory->getProxy('Mediadiv\\AdminBundle\\Entity\\Estados', array('id' => 1)) (vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2707) at Doctrine\ORM\UnitOfWork->createEntity('Mediadiv\\AdminBundle\\Entity\\CategoriasShop', array('id' => 30, 'nombre' => 'Mini canvas', 'url' => null, 'orden' => null, 'estados_id' => 1), array('fetchMode' => array('Mediadiv\AdminBundle\Entity\CategoriasShop' => array('estados' => 2)))) (vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:147) at Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateRowData(array('id_1' => '30', 'nombre_2' => 'Mini canvas', 'url_3' => null, 'orden_4' => null, 'estados_id_5' => '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' => '30'), null, null, array(), null, 1, null) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:196) at Doctrine\ORM\EntityRepository->findOneBy(array('id' => '30')) (src/Mediadiv/HomeBundle/Controller/DefaultController.php:384) at Mediadiv\HomeBundle\Controller\DefaultController->categoriasAction(object(Request), '30', '7', 'Fine%20Arts', 'Mini%20canvas') (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) |