Skip to content

Instantly share code, notes, and snippets.

@rvsjoen
Created July 11, 2012 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rvsjoen/3091083 to your computer and use it in GitHub Desktop.
Save rvsjoen/3091083 to your computer and use it in GitHub Desktop.
<?php
class DonkeyController extends JController
{
public function doshit()
{
$model = $this->getModel();
$model->setState('foo', 'bar');
$model->foo = 'bar';
$this->setRedirect('index.php?option=com_donkey&view=shit');
}
}
class DonkeyViewShit extends JView
{
public function display($tpl = null)
{
$model = $this->getModel();
var_dump($model->foo);
var_dump($model->getState()->get('foo'));
}
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment