Documentation

UpdateEnrollmentDTO extends AbstractBaseDto
in package
implements DTOInterface

Abstract base class for Data Transfer Objects (DTOs).

Provides common functionality for all DTO classes including data population, array transformation for Canvas API multipart format, and date/time handling. DTOs are used to format and validate data before sending to the Canvas API.

Table of Contents

Interfaces

DTOInterface

Properties

$courseSectionId  : string|null
$endAt  : DateTime|null
$enrollmentState  : string|null
$limitPrivilegesToCourseSection  : bool|null
$notify  : bool|null
$roleId  : string|null
$startAt  : DateTime|null
$apiPropertyName  : string
The name of the property in the API

Methods

__construct()  : mixed
BaseDto constructor.
getCourseSectionId()  : string|null
Get the course section ID
getEndAt()  : string|null
Get end date
getEnrollmentState()  : string|null
Get the enrollment state
getRoleId()  : string|null
Get the role ID
getStartAt()  : string|null
Get start date
isLimitPrivilegesToCourseSection()  : bool|null
Get limit privileges to course section flag
isNotify()  : bool|null
Get notification preference
setCourseSectionId()  : void
Set the course section ID
setEndAt()  : void
Set end date
setEnrollmentState()  : void
Set the enrollment state
setLimitPrivilegesToCourseSection()  : void
Set limit privileges to course section flag
setNotify()  : void
Set notification preference
setRoleId()  : void
Set the role ID
setStartAt()  : void
Set start date
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 with proper date formatting

Properties

$limitPrivilegesToCourseSection

public bool|null $limitPrivilegesToCourseSection = null

$apiPropertyName

The name of the property in the API

protected string $apiPropertyName = 'enrollment'

Methods

__construct()

BaseDto constructor.

public __construct(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Tags
throws
Exception

getCourseSectionId()

Get the course section ID

public getCourseSectionId() : string|null
Return values
string|null

getEnrollmentState()

Get the enrollment state

public getEnrollmentState() : string|null
Return values
string|null

getRoleId()

Get the role ID

public getRoleId() : string|null
Return values
string|null

getStartAt()

Get start date

public getStartAt() : string|null
Return values
string|null

isLimitPrivilegesToCourseSection()

Get limit privileges to course section flag

public isLimitPrivilegesToCourseSection() : bool|null
Return values
bool|null

isNotify()

Get notification preference

public isNotify() : bool|null
Return values
bool|null

setCourseSectionId()

Set the course section ID

public setCourseSectionId(string|null $courseSectionId) : void
Parameters
$courseSectionId : string|null

setEndAt()

Set end date

public setEndAt(DateTime|string|null $endAt) : void
Parameters
$endAt : DateTime|string|null

setEnrollmentState()

Set the enrollment state

public setEnrollmentState(string|null $enrollmentState) : void
Parameters
$enrollmentState : string|null

setLimitPrivilegesToCourseSection()

Set limit privileges to course section flag

public setLimitPrivilegesToCourseSection(bool|null $limitPrivilegesToCourseSection) : void
Parameters
$limitPrivilegesToCourseSection : bool|null

setNotify()

Set notification preference

public setNotify(bool|null $notify) : void
Parameters
$notify : bool|null

setRoleId()

Set the role ID

public setRoleId(string|null $roleId) : void
Parameters
$roleId : string|null

setStartAt()

Set start date

public setStartAt(DateTime|string|null $startAt) : void
Parameters
$startAt : DateTime|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 with proper date formatting

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results