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         $sHeader = str_replace( array( "\n", "\r" ), '', $sHeader );
00021         $this->_aHeader[] = (string) $sHeader."\r\n";
00022     }
00023 
00029     public function getHeader()
00030     {
00031         return $this->_aHeader;
00032     }
00033 
00039     public function sendHeader()
00040     {
00041         foreach ($this->_aHeader as $sHeader) {
00042             if ( isset( $sHeader ) ) {
00043                 header( $sHeader );
00044             }
00045         }
00046     }
00047 
00055     public function setNonCacheable()
00056     {
00057         $sHeader = "Cache-Control: no-cache;";
00058         $this->setHeader( $sHeader );
00059     }
00060 }