class IndexController extends AbstractActionController
{
- private $_galerieArrayTable;
- private $_galerieATable;
- private $_galerieBTable;
- private $_galerieCTable;
- private $_galerieCTable2;
+ private $_galerieTable;
+ private $_galerieInfoTable;
- private function _getGalerieArrayTable()
+ private function _getGalerieTable()
{
- if (!$this->_galerieArrayTable) {
+ if (!$this->_galerieTable) {
$sm = $this->getServiceLocator();
- $this->_galerieArrayTable = $sm->get('Galerie\Model\GalerieArrayTable');
+ $this->_galerieTable = $sm->get('Galerie\Model\GalerieTable');
}
- return $this->_galerieArrayTable;
+ return $this->_galerieTable;
}
- private function _getGalerieATable()
+ private function _getGalerieInfoTable()
{
- if (!$this->_galerieATable) {
+ if (!$this->_galerieInfoTable) {
$sm = $this->getServiceLocator();
- $this->_galerieATable = $sm->get('Galerie\Model\GalerieATable');
+ $this->_galerieInfoTable = $sm->get('Galerie\Model\GalerieInfoTable');
}
- return $this->_galerieATable;
+ return $this->_galerieInfoTable;
}
- private function _getGalerieBTable()
- {
- if (!$this->_galerieBTable) {
- $sm = $this->getServiceLocator();
- $this->_galerieBTable = $sm->get('Galerie\Model\GalerieBTable');
- }
- return $this->_galerieBTable;
- }
-
- private function _getGalerieCTable()
- {
- if (!$this->_galerieCTable) {
- $sm = $this->getServiceLocator();
- $this->_galerieCTable = $sm->get('Galerie\Model\GalerieCTable');
- }
- return $this->_galerieCTable;
- }
-
- private function _getGalerieCTable2()
- {
- if (!$this->_galerieCTable2) {
- $sm = $this->getServiceLocator();
- $this->_galerieCTable2 = $sm->get('Galerie\Model\GalerieCTable2');
- }
- return $this->_galerieCTable2;
- }
public function indexAction()
{
return new ViewModel(array(
- 'GalerieArray_all' => $this->_getGalerieArrayTable()->fetchAll(),
- 'GalerieArray_one' => $this->_getGalerieArrayTable()->getGalerie(1),
- 'GalerieA_all' => $this->_getGalerieATable()->fetchAll(),
- 'GalerieA_one' => $this->_getGalerieATable()->getGalerie(1),
- 'GalerieB_all' => $this->_getGalerieBTable()->fetchAll(),
- 'GalerieB_one' => $this->_getGalerieBTable()->getGalerie(1),
- 'GalerieC_all' => $this->_getGalerieCTable()->fetchAll(),
- 'GalerieC_one' => $this->_getGalerieCTable()->getGalerie(1),
- 'GalerieC2_all' => $this->_getGalerieCTable2()->fetchAll(),
- 'GalerieC2_one' => $this->_getGalerieCTable2()->getGalerie(1),
+ 'galeries' => $this->_getGalerieInfoTable()->all(),
));
}