OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxheader.php
Go to the documentation of this file.
1 <?php
2 
7 class oxHeader
8 {
9  protected $_aHeader = array();
10 
18  public function setHeader( $sHeader )
19  {
20  $sHeader = str_replace( array( "\n", "\r" ), '', $sHeader );
21  $this->_aHeader[] = (string) $sHeader."\r\n";
22  }
23 
29  public function getHeader()
30  {
31  return $this->_aHeader;
32  }
33 
39  public function sendHeader()
40  {
41  foreach ($this->_aHeader as $sHeader) {
42  if ( isset( $sHeader ) ) {
43  header( $sHeader );
44  }
45  }
46  }
47 
55  public function setNonCacheable()
56  {
57  $sHeader = "Cache-Control: no-cache;";
58  $this->setHeader( $sHeader );
59  }
60 }