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;
  }
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;
  }
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 ; }
Setter for caption.

@param string|CaptionDescriptor $value
Caption.

@return $this
Setter for caption .