original_string: public function setCaption($value) {
      $class = CaptionDescriptor::class;
      if (is_object($value)) {
        if ($value instanceof $class) {
          $this->caption = $value;
        }
        else {
          $this->triggerError("Caption not of class ${class}.");
        }
      }
      else {
        $this->caption = (string) $value;
      }
      return $this;
    }
code: public function setCaption($value) {
      $class = CaptionDescriptor::class;
      if (is_object($value)) {
        if ($value instanceof $class) {
          $this->caption = $value;
        }
        else {
          $this->triggerError("Caption not of class ${class}.");
        }
      }
      else {
        $this->caption = (string) $value;
      }
      return $this;
    }
code_tokens: public function setCaption ( $ value ) { $ class = CaptionDescriptor :: class ; if ( is_object ( $ value ) ) { if ( $ value instanceof $ class ) { $ this -> caption = $ value ; } else { $ this -> triggerError ( "Caption not of class ${class}." ) ; } } else { $ this -> caption = ( string ) $ value ; } return $ this ; }
docstring: Setter for caption.
  
  @param string|CaptionDescriptor $value
  Caption.
  
  @return $this
docstring_tokens: Setter for caption .