public function getContentLength()
    {
        if (null !== $this->requestStack && null !== $request = $this->requestStack->getCurrentRequest()) {
            return $request->server->get('CONTENT_LENGTH');
        }

        return isset($_SERVER['CONTENT_LENGTH'])
            ? (int) $_SERVER['CONTENT_LENGTH']
            : null;
    }
public function getContentLength()
    {
        if (null !== $this->requestStack && null !== $request = $this->requestStack->getCurrentRequest()) {
            return $request->server->get('CONTENT_LENGTH');
        }

        return isset($_SERVER['CONTENT_LENGTH'])
            ? (int) $_SERVER['CONTENT_LENGTH']
            : null;
    }
public function getContentLength ( ) { if ( null !== $ this -> requestStack && null !== $ request = $ this -> requestStack -> getCurrentRequest ( ) ) { return $ request -> server -> get ( 'CONTENT_LENGTH' ) ; } return isset ( $ _SERVER [ 'CONTENT_LENGTH' ] ) ? ( int ) $ _SERVER [ 'CONTENT_LENGTH' ] : null ; }
Returns the content length of the request.

@return mixed The request content length
Returns the content length of the request .