UpdateSubmissionCommentDTO
extends AbstractBaseDto
in package
implements
DTOInterface
Data Transfer Object for updating submission comments in Canvas LMS
This DTO handles updating existing submission comments with all the necessary fields supported by the Canvas Submission Comments API.
Table of Contents
Interfaces
Properties
- $textComment : string|null
- Updated text content of the comment
- $apiPropertyName : string
- The API property name for multipart requests
Methods
- __construct() : mixed
- BaseDto constructor.
- getTextComment() : string|null
- Get text comment
- setTextComment() : void
- Set text comment
- toApiArray() : array<string|int, mixed>
- Convert the DTO to an array for API requests
- toArray() : array<string|int, mixed>
- Convert the DTO to an array
- formatMultipartValue() : mixed
- Format a value for multipart form contents
Properties
$textComment
Updated text content of the comment
public
string|null
$textComment
= null
$apiPropertyName
The API property name for multipart requests
protected
string
$apiPropertyName
= 'comment'
Methods
__construct()
BaseDto constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
getTextComment()
Get text comment
public
getTextComment() : string|null
Return values
string|nullsetTextComment()
Set text comment
public
setTextComment(string|null $textComment) : void
Parameters
- $textComment : string|null
toApiArray()
Convert the DTO to an array for API requests
public
toApiArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
Convert the DTO to an array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>formatMultipartValue()
Format a value for multipart form contents
protected
static formatMultipartValue(mixed $value) : mixed
Booleans must be converted explicitly: Guzzle's multipart encoder string-casts contents, turning false into an empty string instead of 'false', which Canvas may interpret differently than an unset flag.
Parameters
- $value : mixed
-
The value to format