Beispiel #1
0
 /**
  * Public function that creates a single instance
  */
 public static function getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Beispiel #2
0
 /**
  * Get raw template.
  *
  * @return array
  */
 public function getTemplate($name)
 {
     global $language;
     $result = null;
     $manager = ContactForm_TemplateManager::getInstance();
     // get template
     $template = $manager->getSingleItem($manager->getFieldNames(), array('text_id' => $name));
     if (is_object($template)) {
         $result = array('plain_body' => $template->plain[$language], 'html_body' => $template->html[$language], 'subject' => $template->subject[$language]);
     }
     return $result;
 }