Пример #1
0
 /**
  * Vraag de ingestelde headers op van deze template en eventuele subcomponenten.
  *
  * @return array
  */
 public function getHeaders()
 {
     $headers = $this->headers;
     $components = $this->getSubviews($this->variables);
     foreach ($components as $component) {
         $headers = \Sledgehammer\merge_headers($headers, $component);
     }
     return $headers;
 }
Пример #2
0
 public function getHeaders()
 {
     if (method_exists($this->component, 'getHeaders')) {
         if ($this->allowOverride) {
             return \Sledgehammer\merge_headers($this->headers, $this->component);
         }
         return \Sledgehammer\merge_headers($this->component->getHeaders(), $this->headers);
     }
     return $this->headers;
     // Het component had geen headers.
 }
Пример #3
0
 /**
  * Vraag de headers op en werk de interne headers array bij.
  *
  * @return array
  */
 public function getHeaders()
 {
     $headers = array('http' => array('Content-Type' => $this->contentType), 'charset' => Framework::$charset, 'htmlParameters' => array(), 'bodyParameters' => array());
     if (defined('Sledgehammer\\WEBPATH') && \Sledgehammer\WEBPATH != '/' && file_exists(\Sledgehammer\PATH . 'application/public/favicon.ico')) {
         $headers['link']['favicon'] = array('rel' => 'shortcut icon', 'href' => \Sledgehammer\WEBROOT . 'favicon.ico', 'type' => 'image/x-icon');
     }
     // $headers['http']['Content-Type'] = 'application/xhtml+xml';
     if (ErrorHandler::instance()->html) {
         $headers['css']['debug'] = \Sledgehammer\WEBROOT . 'core/css/debug.css';
     }
     $this->headers = \Sledgehammer\merge_headers($headers, $this->content);
     if (empty($this->headers['title'])) {
         notice('getHeaders() should contain a "title" element for a HTMLDocument');
     }
     return $this->headers;
 }