Skip to content

Instantly share code, notes, and snippets.

@mishak87
Created January 21, 2014 12:22
Show Gist options
  • Save mishak87/8539051 to your computer and use it in GitHub Desktop.
Save mishak87/8539051 to your computer and use it in GitHub Desktop.
<?php
trait TemplateFactory
{
/**
* @inject
* @var \Rixxi\ITemplateFactory
*/
public $templateFactory;
protected function createTemplate($class = NULL)
{
return $this->templateFactory !== NULL
? $this->templateFactory->createTemplate($this, $class)
: parent::createTemplate($class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment