Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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