public function testGetTemplateObject() { $sl = new AetherServiceLocator(); $sl->set('projectRoot', AETHER_PATH . 'tests/templating/'); $tpl = AetherTemplate::get('smarty', $sl); $this->assertTrue($tpl instanceof AetherTemplateSmarty); }
/** * Fetch a reference to the templating object * thats floating around in Aether * * @access public * @return AetherTemplate A template object */ public function getTemplate() { if ($this->template == null) { $this->template = AetherTemplate::get('smarty', $this); } // Add global stuff $providers = $this->getVector('aetherProviders'); $this->template->set('aether', array_merge(array('providers' => $providers), $this->getVector('templateGlobals')->getAsArray())); return $this->template; }