Exemplo n.º 1
0
 /**
  * Override __toString() to send HTTP Content-Type header
  *
  * @return string
  */
 public function __toString()
 {
     if (!headers_sent()) {
         header('Content-Type: text/xml; charset=' . strtolower($this->getEncoding()));
     }
     return parent::__toString();
 }
Exemplo n.º 2
0
 /**
  * __toString() test
  */
 public function test__toString()
 {
     $this->_response->setReturnValue('return value');
     $xml = $this->_response->__toString();
     $this->_testXmlResponse($xml);
 }