public function get() { $content = $this->_getContent(); $compress = !$this->_render->getEnvironment()->isDebug(); return $this->_compile($content, $compress); }
public function testParseTemplateContent() { $viewer = CM_Model_User::createStatic(); $render = new CM_Frontend_Render(); $render->getEnvironment()->setViewer($viewer); $content = '{$viewer->getId()} {$foo} normal-text'; $expected = $viewer->getId() . ' bar normal-text'; $this->assertSame($expected, $render->parseTemplateContent($content, ['foo' => 'bar'])); }