original_string: protected function populateRequest (CAS_Request_RequestInterface $request)
      {
          if (empty($this->_contentType) && !empty($this->_body)) {
              throw new CAS_ProxiedService_Exception(
                  "If you pass a POST body, you must specify a content type via "
                  .get_class($this).'->setContentType($contentType).'
              );
          }
  
          $request->makePost();
          if (!empty($this->_body)) {
              $request->addHeader('Content-Type: '.$this->_contentType);
              $request->addHeader('Content-Length: '.strlen($this->_body));
              $request->setPostBody($this->_body);
          }
      }
code: protected function populateRequest (CAS_Request_RequestInterface $request)
      {
          if (empty($this->_contentType) && !empty($this->_body)) {
              throw new CAS_ProxiedService_Exception(
                  "If you pass a POST body, you must specify a content type via "
                  .get_class($this).'->setContentType($contentType).'
              );
          }
  
          $request->makePost();
          if (!empty($this->_body)) {
              $request->addHeader('Content-Type: '.$this->_contentType);
              $request->addHeader('Content-Length: '.strlen($this->_body));
              $request->setPostBody($this->_body);
          }
      }
code_tokens: protected function populateRequest ( CAS_Request_RequestInterface $ request ) { if ( empty ( $ this -> _contentType ) && ! empty ( $ this -> _body ) ) { throw new CAS_ProxiedService_Exception ( "If you pass a POST body, you must specify a content type via " . get_class ( $ this ) . '->setContentType($contentType).' ) ; } $ request -> makePost ( ) ; if ( ! empty ( $ this -> _body ) ) { $ request -> addHeader ( 'Content-Type: ' . $ this -> _contentType ) ; $ request -> addHeader ( 'Content-Length: ' . strlen ( $ this -> _body ) ) ; $ request -> setPostBody ( $ this -> _body ) ; } }
docstring: Add any other parts of the request needed by concrete classes
  
  @param CAS_Request_RequestInterface $request request interface class
  
  @return void
docstring_tokens: Add any other parts of the request needed by concrete classes