public function length($bytes = null)
    {
        deprecationWarning(
            'Response::length() is deprecated. ' .
            'Use withLength() instead.'
        );

        if ($bytes !== null) {
            $this->_setHeader('Content-Length', $bytes);
        }

        if ($this->hasHeader('Content-Length')) {
            return $this->getHeaderLine('Content-Length');
        }

        return null;
    }
public function length($bytes = null)
    {
        deprecationWarning(
            'Response::length() is deprecated. ' .
            'Use withLength() instead.'
        );

        if ($bytes !== null) {
            $this->_setHeader('Content-Length', $bytes);
        }

        if ($this->hasHeader('Content-Length')) {
            return $this->getHeaderLine('Content-Length');
        }

        return null;
    }
public function length ( $ bytes = null ) { deprecationWarning ( 'Response::length() is deprecated. ' . 'Use withLength() instead.' ) ; if ( $ bytes !== null ) { $ this -> _setHeader ( 'Content-Length' , $ bytes ) ; } if ( $ this -> hasHeader ( 'Content-Length' ) ) { return $ this -> getHeaderLine ( 'Content-Length' ) ; } return null ; }
Sets the Content-Length header for the response
If called with no arguments returns the last Content-Length set

@param int|null $bytes Number of bytes
@return string|null
@deprecated 3.4.0 Use withLength() to set length instead.
Sets the Content - Length header for the response If called with no arguments returns the last Content - Length set