original_string: public function setSupportedMediaTypes(array $mediaTypes)
      {
          foreach ($mediaTypes as $mediaType => $converterClass) {
              if (!is_string($mediaType)) {
                  throw new Exception('Media type must be a string.');
              }
  
              if (!is_string($converterClass)) {
                  throw new Exception('Converter class name must be a string.');
              }
          }
  
          $this->supportedMediaTypes = $mediaTypes;
      }
code: public function setSupportedMediaTypes(array $mediaTypes)
      {
          foreach ($mediaTypes as $mediaType => $converterClass) {
              if (!is_string($mediaType)) {
                  throw new Exception('Media type must be a string.');
              }
  
              if (!is_string($converterClass)) {
                  throw new Exception('Converter class name must be a string.');
              }
          }
  
          $this->supportedMediaTypes = $mediaTypes;
      }
code_tokens: public function setSupportedMediaTypes ( array $ mediaTypes ) { foreach ( $ mediaTypes as $ mediaType => $ converterClass ) { if ( ! is_string ( $ mediaType ) ) { throw new Exception ( 'Media type must be a string.' ) ; } if ( ! is_string ( $ converterClass ) ) { throw new Exception ( 'Converter class name must be a string.' ) ; } } $ this -> supportedMediaTypes = $ mediaTypes ; }
docstring: Sets the list of supported media types for negotiation.
  
  @param array $mediaTypes
  
  @throws \BedRest\Content\Negotiation\Exception
docstring_tokens: Sets the list of supported media types for negotiation .