Created
January 29, 2014 15:54
-
-
Save harikt/8690904 to your computer and use it in GitHub Desktop.
Some thoughts
This file contains 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 Aura\Web_Kernel; | |
class Renderer | |
{ | |
public $data; | |
public $renderer; | |
public $view; | |
public $layout; | |
public $response | |
public function setRenderer($renderer) | |
{ | |
$this->renderer = $renderer; | |
} | |
public function setResponse(Aura\Web\Response $response) | |
{ | |
$this->response = $response; | |
} | |
public function __invoke() | |
{ | |
// as in framework | |
if ($this->response->getContent() == null) { | |
$content = $this->renderer->render($this->data, $this->view, $this->layout); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment