コード例 #1
0
ファイル: TemplateHelper.php プロジェクト: Konafets/oelib
 /**
  * Returns the template object from the template registry for the file name
  * in $this->templateFileName.
  *
  * @return Tx_Oelib_Template the template object for the template file name
  *                           in $this->templateFileName
  */
 protected function getTemplate()
 {
     if ($this->template === NULL) {
         $this->template = Tx_Oelib_TemplateRegistry::get($this->templateFileName);
     }
     return $this->template;
 }
コード例 #2
0
ファイル: TemplateRegistry.php プロジェクト: Konafets/oelib
 /**
  * Purges the current instance so that getInstance will create a new instance.
  *
  * @return void
  */
 public static function purgeInstance()
 {
     self::$instance = NULL;
 }
コード例 #3
0
 /**
  * @test
  */
 public function getForExistingTemplateFileNameReturnsProcessedTemplate()
 {
     $template = Tx_Oelib_TemplateRegistry::get('EXT:oelib/Tests/Unit/Fixtures/oelib.html');
     self::assertSame('Hello world!' . LF, $template->getSubpart());
 }