Created
September 22, 2011 07:58
-
-
Save mgallego/1234273 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace SFM\PicmntBundle\Controller; | |
| use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
| use SFM\PicmntBundle\Entity\Image; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; | |
| class PaginatorController// extends Controller | |
| { | |
| protected $container; | |
| public function __constructor(ContainerInterface $container){ | |
| $this->container = $container; | |
| } | |
| public function getContainer(){ | |
| return $this->container; | |
| } | |
| public function pruebaAction() | |
| { | |
| print('prueba: '.$this->getContainer()); | |
| $prueba = $this->getContainer()->get('request'); | |
| //$em = $this->container->get('doctrine')->getEntityManager(); | |
| //$em = static::createClient()->getContainer()->get('doctrine')->getEntityManager(); | |
| //$images = $em->getRepository('SFMPicmntBundle:Image')->findFirst('p.idImage DESC'); | |
| //$image = $images[0]; | |
| //print $image->getIdImage(); | |
| //return $image->getIdImage(); | |
| } | |
| public function prueba2Action(){ | |
| $this->pruebaAction(); | |
| return 1; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment