oxheader.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class oxHeader
00008 {
00009 
00010     protected $_aHeader = array();
00011 
00017     public function setHeader($sHeader)
00018     {
00019         $sHeader = str_replace(array("\n", "\r"), '', $sHeader);
00020         $this->_aHeader[] = (string) $sHeader . "\r\n";
00021     }
00022 
00028     public function getHeader()
00029     {
00030         return $this->_aHeader;
00031     }
00032 
00036     public function sendHeader()
00037     {
00038         foreach ($this->_aHeader as $sHeader) {
00039             if (isset($sHeader)) {
00040                 header($sHeader);
00041             }
00042         }
00043     }
00044 
00050     public function setNonCacheable()
00051     {
00052         $sHeader = "Cache-Control: no-cache;";
00053         $this->setHeader($sHeader);
00054     }
00055 }