Conference
extends AbstractBaseApi
in package
Conference API class for managing web conferences in Canvas LMS.
This class provides methods for creating, reading, updating, and deleting web conferences. Conferences can exist in both Course and Group contexts and support multiple conferencing providers like BigBlueButton, Zoom, etc.
Tags
Table of Contents
Properties
- $attendees : array<string|int, mixed>|null
- $conferenceType : string|null
- $contextId : int|null
- $contextType : string|null
- $createdAt : DateTime|null
- $description : string|null
- $duration : int|null
- $endedAt : DateTime|null
- $hasAdvancedSettings : bool|null
- $id : int|null
- $joinUrl : string|null
- $longRunning : bool|null
- $recordings : array<string|int, ConferenceRecording>|null
- $settings : array<string, mixed>|null
- $startedAt : DateTime|null
- $status : string|null
- $title : string|null
- $updatedAt : DateTime|null
- $url : string|null
- $users : array<string|int, int>|null
- $apiClient : HttpClientInterface
- $methodAliases : array<string|int, mixed>
- Define method aliases
Methods
- __callStatic() : mixed
- Magic method to handle function aliases
- __construct() : mixed
- Constructor to initialize conference from array data.
- all() : array<string|int, static>
- Get all pages of results
- createForCourse() : self
- Create a new conference for a course.
- createForGroup() : self
- Create a new conference for a group.
- delete() : self
- Delete the conference.
- fetchByCourse() : array<string|int, Conference>
- Fetch all conferences for a course.
- fetchByGroup() : array<string|int, Conference>
- Fetch all conferences for a group.
- find() : self
- Find a specific conference by ID.
- get() : array<string|int, Conference>
- Fetch all conferences (not implemented - conferences require context).
- getRecordings() : array<string|int, ConferenceRecording>
- Get conference recordings.
- join() : array<string, mixed>
- Join the conference.
- paginate() : PaginationResult
- Get paginated results with metadata
- setApiClient() : void
- Set the API client
- update() : self
- Update the conference.
- castValue() : DateTime|mixed
- Cast a value to the correct type
- checkApiClient() : void
- Check if the API client is set, if not, instantiate a new one
- convertPaginatedResponseToModels() : array<string|int, static>
- Helper method to convert paginated response data to model instances
- createConfiguredHttpClient() : HttpClient
- Create an HttpClient with configured middleware
- createPaginationResult() : PaginationResult
- Helper method to create PaginationResult from paginated response
- getApiEndpoint() : string
- Get the API endpoint for conferences.
- getClassName() : string
- Get the class name for API responses.
- getEndpoint() : string
- Get the API endpoint for this resource Note: Conference endpoints are context-specific and this should not be used directly
- getPaginatedResponse() : PaginatedResponse
- Helper method to get paginated response from API endpoint
- populate() : void
- Populate the object with new data
- toDtoArray() : array<string|int, mixed>
- Convert the object to an array
- processRecordings() : void
- Process recordings from API response data.
Properties
$attendees
public
array<string|int, mixed>|null
$attendees
= null
$conferenceType
public
string|null
$conferenceType
= null
$contextId
public
int|null
$contextId
= null
$contextType
public
string|null
$contextType
= null
$createdAt
public
DateTime|null
$createdAt
= null
$description
public
string|null
$description
= null
$duration
public
int|null
$duration
= null
$endedAt
public
DateTime|null
$endedAt
= null
$hasAdvancedSettings
public
bool|null
$hasAdvancedSettings
= null
$id
public
int|null
$id
= null
$joinUrl
public
string|null
$joinUrl
= null
$longRunning
public
bool|null
$longRunning
= null
$recordings
public
array<string|int, ConferenceRecording>|null
$recordings
= null
$settings
public
array<string, mixed>|null
$settings
= null
$startedAt
public
DateTime|null
$startedAt
= null
$status
public
string|null
$status
= null
$title
public
string|null
$title
= null
$updatedAt
public
DateTime|null
$updatedAt
= null
$url
public
string|null
$url
= null
$users
public
array<string|int, int>|null
$users
= null
$apiClient
protected
static HttpClientInterface
$apiClient
= null
$methodAliases
Define method aliases
protected
static array<string|int, mixed>
$methodAliases
= ['get' => ['fetch', 'list', 'fetchAll'], 'all' => ['fetchAllPages', 'getAll'], 'paginate' => ['getPaginated', 'withPagination', 'fetchPage'], 'find' => ['one', 'getOne']]
Methods
__callStatic()
Magic method to handle function aliases
public
static __callStatic(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Tags
__construct()
Constructor to initialize conference from array data.
public
__construct([array<string, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string, mixed> = []
-
Conference data
all()
Get all pages of results
public
static all([array<string, mixed> $params = [] ]) : array<string|int, static>
Parameters
- $params : array<string, mixed> = []
-
Query parameters
Return values
array<string|int, static>createForCourse()
Create a new conference for a course.
public
static createForCourse(int $courseId, array<string, mixed>|CreateConferenceDTO $data) : self
Parameters
- $courseId : int
-
The course ID
- $data : array<string, mixed>|CreateConferenceDTO
-
Conference data
Return values
self —The created Conference object
createForGroup()
Create a new conference for a group.
public
static createForGroup(int $groupId, array<string, mixed>|CreateConferenceDTO $data) : self
Parameters
- $groupId : int
-
The group ID
- $data : array<string, mixed>|CreateConferenceDTO
-
Conference data
Return values
self —The created Conference object
delete()
Delete the conference.
public
delete() : self
Return values
selffetchByCourse()
Fetch all conferences for a course.
public
static fetchByCourse(int $courseId[, array<string, mixed> $params = [] ]) : array<string|int, Conference>
Parameters
- $courseId : int
-
The course ID
- $params : array<string, mixed> = []
-
Optional query parameters
Return values
array<string|int, Conference> —Array of Conference objects
fetchByGroup()
Fetch all conferences for a group.
public
static fetchByGroup(int $groupId[, array<string, mixed> $params = [] ]) : array<string|int, Conference>
Parameters
- $groupId : int
-
The group ID
- $params : array<string, mixed> = []
-
Optional query parameters
Return values
array<string|int, Conference> —Array of Conference objects
find()
Find a specific conference by ID.
public
static find(int $id[, array<string|int, mixed> $params = [] ]) : self
Parameters
- $id : int
-
The conference ID
- $params : array<string|int, mixed> = []
-
Optional query parameters
Return values
self —The Conference object
get()
Fetch all conferences (not implemented - conferences require context).
public
static get([array<string, mixed> $params = [] ]) : array<string|int, Conference>
Parameters
- $params : array<string, mixed> = []
-
Optional query parameters
Return values
array<string|int, Conference> —Empty array
getRecordings()
Get conference recordings.
public
getRecordings() : array<string|int, ConferenceRecording>
Return values
array<string|int, ConferenceRecording> —Array of ConferenceRecording objects
join()
Join the conference.
public
join() : array<string, mixed>
Return values
array<string, mixed> —Conference join information including URL
paginate()
Get paginated results with metadata
public
static paginate([array<string, mixed> $params = [] ]) : PaginationResult
Parameters
- $params : array<string, mixed> = []
-
Query parameters
Return values
PaginationResultsetApiClient()
Set the API client
public
static setApiClient(HttpClientInterface $apiClient) : void
Parameters
- $apiClient : HttpClientInterface
update()
Update the conference.
public
update(array<string, mixed>|UpdateConferenceDTO $data) : self
Parameters
- $data : array<string, mixed>|UpdateConferenceDTO
-
Update data
Return values
selfcastValue()
Cast a value to the correct type
protected
castValue(string $key, mixed $value) : DateTime|mixed
Parameters
- $key : string
- $value : mixed
Tags
Return values
DateTime|mixedcheckApiClient()
Check if the API client is set, if not, instantiate a new one
protected
static checkApiClient() : void
convertPaginatedResponseToModels()
Helper method to convert paginated response data to model instances
protected
static convertPaginatedResponseToModels(PaginatedResponse $paginatedResponse) : array<string|int, static>
Parameters
- $paginatedResponse : PaginatedResponse
Return values
array<string|int, static>createConfiguredHttpClient()
Create an HttpClient with configured middleware
protected
static createConfiguredHttpClient() : HttpClient
Return values
HttpClientcreatePaginationResult()
Helper method to create PaginationResult from paginated response
protected
static createPaginationResult(PaginatedResponse $paginatedResponse) : PaginationResult
Parameters
- $paginatedResponse : PaginatedResponse
Return values
PaginationResultgetApiEndpoint()
Get the API endpoint for conferences.
protected
static getApiEndpoint() : string
Return values
stringgetClassName()
Get the class name for API responses.
protected
static getClassName() : string
Return values
stringgetEndpoint()
Get the API endpoint for this resource Note: Conference endpoints are context-specific and this should not be used directly
protected
static getEndpoint() : string
Tags
Return values
stringgetPaginatedResponse()
Helper method to get paginated response from API endpoint
protected
static getPaginatedResponse(string $endpoint[, array<string|int, mixed> $params = [] ]) : PaginatedResponse
Parameters
- $endpoint : string
-
The API endpoint path
- $params : array<string|int, mixed> = []
-
Query parameters for the request
Return values
PaginatedResponsepopulate()
Populate the object with new data
protected
populate(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
Tags
toDtoArray()
Convert the object to an array
protected
toDtoArray() : array<string|int, mixed>
Return values
array<string|int, mixed>processRecordings()
Process recordings from API response data.
private
processRecordings(array<string, mixed> $data) : void
Parameters
- $data : array<string, mixed>
-
API response data