oxheader.php

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