public static function getInstance() { if (is_null(self::$instance) || !isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
public function createResult(array $resultMap) { $templateEng = SmartyEngine::getInstance(); $response = ResponseContext::getResponse(); $valArray = $response->getProperties(); foreach ($valArray as $key => $val) { $templateEng->assign($key, $val); } $templateEng->show($resultMap['value']); }