original_string: public function setAttribute($key, $value)
      {
          if (array_key_exists($key, $this->getMediaFiles())) {
              if ($value) {
                  $this->media_files[$key]
                      ->setUploadedFile($value, $key);
              }
  
              return $this;
          }
  
          return parent::setAttribute($key, $value);
      }
code: public function setAttribute($key, $value)
      {
          if (array_key_exists($key, $this->getMediaFiles())) {
              if ($value) {
                  $this->media_files[$key]
                      ->setUploadedFile($value, $key);
              }
  
              return $this;
          }
  
          return parent::setAttribute($key, $value);
      }
code_tokens: public function setAttribute ( $ key , $ value ) { if ( array_key_exists ( $ key , $ this -> getMediaFiles ( ) ) ) { if ( $ value ) { $ this -> media_files [ $ key ] -> setUploadedFile ( $ value , $ key ) ; } return $ this ; } return parent :: setAttribute ( $ key , $ value ) ; }
docstring: Handle the dynamic setting of media items.
  
  @param string $key
  @param mixed  $value
  
  @return $this
docstring_tokens: Handle the dynamic setting of media items .