Skip to content

Instantly share code, notes, and snippets.

@harikt
Created January 29, 2014 15:54
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 harikt/8690904 to your computer and use it in GitHub Desktop.
Save harikt/8690904 to your computer and use it in GitHub Desktop.
Some thoughts
<?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