Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Zend\View and the Variables
use Zend\Controller\Action,
use App\Model;
class IndexController extends Action
public function init()
$this->model = new Model\News();
$this->viewVars = new Variables();
public function indexAction()
$this->viewVars->offsetSet('news', $this->model->getAllActiveNews());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.