/** * Index action. * * @access public * @param Silex\Application $app Silex application * @param Symfony\Component\HttpFoundation\Request $request Request object * @return string Output */ public function indexAction(Application $app, Request $request) { $photosModel = new PhotosModel($app); $this->view['photos'] = $photosModel->getAll(); // var_dump($this->view['photos']); return $app['twig']->render('gallery.twig', $this->view); }