public static function respond($responseID, $responseData = [], $responseMode = false)
 {
     if ($responseID == 'projectUpdates' && $_GET['format'] == 'rss') {
         header('Content-Type: application/rss+xml');
         return \Emergence\Dwoo\Engine::respond('projectUpdates.rss', $responseData);
     }
     return parent::respond($responseID, $responseData, $responseMode);
 }
예제 #2
0
 public static function renderTemplate($template, $data = array())
 {
     $email = array('from' => null, 'subject' => null, 'body' => trim(\Emergence\Dwoo\Engine::getSource($template . '.email', $data)));
     $templateVars = \Emergence\Dwoo\Engine::getInstance()->scope;
     if (isset($templateVars['from'])) {
         $email['from'] = trim(preg_replace('/\\s+/', ' ', $templateVars['from']));
     }
     if (isset($templateVars['subject'])) {
         $email['subject'] = trim(preg_replace('/\\s+/', ' ', $templateVars['subject']));
     }
     return $email;
 }
 public static function respondHtml($responseId, array $responseData = [])
 {
     header('Content-Type: text/html; charset=utf-8');
     $responseData['responseID'] = $responseId;
     return \Emergence\Dwoo\Engine::respond($responseId, $responseData);
 }