/**
  * @access public
  * @param $encoder Scaffold_Response_Encoder
  * @param $cache Scaffold_Response_Cache
  * @param $options
  * @return void
  */
 public function __construct(Scaffold_Response_Encoder $encoder, Scaffold_Response_Cache $cache, $options = array())
 {
     $this->encoder = $encoder;
     $this->cache = $cache;
     // Get the default options
     $this->options = array_merge($this->_default_options, $options);
     // Are we encoding the output?
     $this->encoding = $this->encoder->get_encoding_type();
 }
Exemple #2
0
 /**
  * @access public
  * @param $encoder Scaffold_Response_Encoder
  * @param $cache Scaffold_Response_Cache
  * @param $options
  * @return void
  */
 public function __construct(Scaffold_Response_Encoder $encoder, Scaffold_Response_Cache $cache, $options = array())
 {
     // This will handle encoding the output
     $this->encoder = $encoder;
     // Lets us check the browsers cache
     $this->cache = $cache;
     // Get the default options
     $this->options = array_merge($this->_default_options, $options);
     // Are we encoding the output?
     $this->encoding = $this->encoder->get_encoding_type();
     // If we're encoding the output we need to set some headers
     if ($this->encoding !== false) {
         $this->headers['Content-Encoding'] = $this->encoding;
         $this->headers['Vary'] = 'Accept-Encoding';
     }
 }