tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Source for file just_headers_view.class.php

Documentation is available at just_headers_view.class.php

  1. <?php
  2. // *** Tangra (Application Framework and Tools for PHP)
  3. // $Id$
  4. //
  5.  
  6. /**
  7.  * Contains class Just_Headers_View
  8.  *
  9.  * @package tangra_lib
  10.  * @subpackage  web_site
  11.  */
  12.  
  13. /**
  14.  *
  15.  */
  16. require_once(TANGRA_MAIN_DIR.'web_site/web_page/web_page_view.class.php');
  17.  
  18.  
  19. /**
  20.  * Just_Headers_View is used to be returned by Web_Page instances when redirect is requested
  21.  *
  22.  * @package tangra_lib
  23.  * @subpackage  web_site
  24.  */
  25. class Just_Headers_View extends Web_Page_View {
  26.  
  27.     /**
  28.      * Constructor
  29.      *
  30.      */
  31.     function __construct({
  32.         $this->init_exports();
  33.     }
  34.  
  35.  
  36.     /**
  37.      * Empty method just for compliance with Web_Page_View declaration
  38.      *
  39.      */
  40.     public function &fetch_content({
  41.  
  42.     }
  43.  
  44.  
  45.     /**
  46.      * Sends header()
  47.      *
  48.      */
  49.     function show({
  50.         foreach($this->http_headers as $h{
  51.             header($h);
  52.         }
  53.     }
  54.  
  55.  
  56.     /**
  57.      * Sets exports
  58.      *
  59.      * @param TPLE_exports $exports 
  60.      */
  61.     public function set_exports(TPLE_exports $exports{
  62.         $this->exports = $exports;
  63.     }
  64.  
  65.  
  66.     /**
  67.      * Adds http header that will be sent
  68.      *
  69.      * @param unknown_type $http_header 
  70.      */
  71.     public function add_http_header($http_header{
  72.         $this->http_headers[$http_header;
  73.     }
  74.  
  75.  
  76.     /**
  77.      * Return headers array
  78.      *
  79.      * @return unknown 
  80.      */
  81.     public function get_http_headers({
  82.         return $this->http_headers;
  83.     }
  84. }