Skip to content

Instantly share code, notes, and snippets.

@Ikke
Created March 6, 2013 12:32
Show Gist options
  • Save Ikke/5098989 to your computer and use it in GitHub Desktop.
Save Ikke/5098989 to your computer and use it in GitHub Desktop.
<?php
namespace Test\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Helper\ViewModel;
class TestController extends AbstractActionController
{
public function indexAction()
{
/** @var $testTable \Test\Model\TestTable */
$testTable = $this->getServiceLocator()->get('Test\Model\TestTable');
return new ViewModel(array('test' => $testTable->fetchAll()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment