public function setContentType($type, $statusCode=null)
    {
        if (isset(static::$_types[$type])) {
            $type = static::$_types[$type];
        }
        $this->setHeader('Content-Type', $type);
        if ($statusCode) {
            $this->_statusCode = $statusCode;
        }
    }
public function setContentType($type, $statusCode=null)
    {
        if (isset(static::$_types[$type])) {
            $type = static::$_types[$type];
        }
        $this->setHeader('Content-Type', $type);
        if ($statusCode) {
            $this->_statusCode = $statusCode;
        }
    }
public function setContentType ( $ type , $ statusCode = null ) { if ( isset ( static :: $ _types [ $ type ] ) ) { $ type = static :: $ _types [ $ type ] ; } $ this -> setHeader ( 'Content-Type' , $ type ) ; if ( $ statusCode ) { $ this -> _statusCode = $ statusCode ; } }
Set the response content type header and status code.

@param string $type Response content type.
@param int $statusCode Response status code.
Set the response content type header and status code .