Skip to content

Instantly share code, notes, and snippets.

@MadaraUchiha
Forked from teresko/gist:3190886
Created July 27, 2012 22:48
Show Gist options
  • Save MadaraUchiha/3190889 to your computer and use it in GitHub Desktop.
Save MadaraUchiha/3190889 to your computer and use it in GitHub Desktop.
<?php
namespace Application\View;
use Fracture\Presentation\View;
use Fracture\Presentation\Template;
class Profile extends View
{
protected $templates = [ 'forms/register' => 'content'
'content/error' => 'content' ];
protected $selectedTemplates = [];
public function applyTemplate( $template )
{
$this->selectedTemplates[] = $template;
}
public function render()
{
$authentication = $this->serviceFactory->create('Authentication');
$event = 'on' . $authentication->getState();
return 'something should be here'
}
protected function onError()
{
$authentication = $this->serviceFactory->create('Authentication');
$this->selectedTemplates[] = 'content/error'
$this->data['error'] = $authentication->getError();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment