Skip to content

Instantly share code, notes, and snippets.

@lgoldstien
Created July 5, 2013 14:59
Show Gist options
  • Save lgoldstien/5935137 to your computer and use it in GitHub Desktop.
Save lgoldstien/5935137 to your computer and use it in GitHub Desktop.
orno-json-task
<?php
namespace App\Controller;
use Orno\Mvc\View\JsonRenderer;
class Task
{
protected $view;
protected $taskid;
public function __construct(JsonRenderer $view)
{
$this->view = $view;
}
public function getAll() {
$tasks = [
[
'title' => 'Do this',
'content' => 'You need to do this',
'user' => 1,
'date_created' => '07/05/2013',
'date_due' => '07/08/2013'
]
];
$this->view->__set('tasks', $tasks);
$this->view->render();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment