Created
July 5, 2013 14:59
-
-
Save lgoldstien/5935137 to your computer and use it in GitHub Desktop.
orno-json-task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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