Documentation

UpdateOutcomeDTO extends AbstractBaseDto
in package

Data Transfer Object for updating outcomes.

Table of Contents

Properties

$calculationInt  : int|null
$calculationMethod  : string|null
$description  : string|null
$displayName  : string|null
$masteryPoints  : float|null
$ratings  : array<int, array{description: string, points: float}>|null
$title  : string|null
$vendorGuid  : string|null
$apiPropertyName  : string
The name of the property in the API

Methods

__construct()  : mixed
BaseDto constructor.
toApiArray()  : array<string|int, mixed>
Convert the DTO to an array for API requests
toArray()  : array<int, array{name: string, contents: string}>
Convert DTO to array for API request.
updateCalculationMethod()  : self
Update calculation method and optional int parameter.
updateDescription()  : self
Update only the description.
updateMasteryPoints()  : self
Update only the mastery points.
updateRatings()  : self
Update only the ratings.
updateTitle()  : self
Update only the title.
validateCalculationMethod()  : bool
Validate the calculation method.
validateRatings()  : bool
Validate the rating scale.
withFields()  : self
Create an UpdateOutcomeDTO with only specific fields.

Properties

$ratings

public array<int, array{description: string, points: float}>|null $ratings = null

$apiPropertyName

The name of the property in the API

protected string $apiPropertyName = 'outcome'

Methods

__construct()

BaseDto constructor.

public __construct([array<string, mixed> $data = [] ]) : mixed
Parameters
$data : array<string, mixed> = []

toApiArray()

Convert the DTO to an array for API requests

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

toArray()

Convert DTO to array for API request.

public toArray() : array<int, array{name: string, contents: string}>
Return values
array<int, array{name: string, contents: string}>

updateCalculationMethod()

Update calculation method and optional int parameter.

public static updateCalculationMethod(string $method[, int|null $calculationInt = null ]) : self
Parameters
$method : string
$calculationInt : int|null = null
Return values
self

updateDescription()

Update only the description.

public static updateDescription(string $description) : self
Parameters
$description : string
Return values
self

updateMasteryPoints()

Update only the mastery points.

public static updateMasteryPoints(float $masteryPoints) : self
Parameters
$masteryPoints : float
Return values
self

updateRatings()

Update only the ratings.

public static updateRatings(array<int, array{description: string, points: float}> $ratings) : self
Parameters
$ratings : array<int, array{description: string, points: float}>
Return values
self

updateTitle()

Update only the title.

public static updateTitle(string $title) : self
Parameters
$title : string
Return values
self

validateCalculationMethod()

Validate the calculation method.

public validateCalculationMethod() : bool
Return values
bool

validateRatings()

Validate the rating scale.

public validateRatings() : bool
Return values
bool

withFields()

Create an UpdateOutcomeDTO with only specific fields.

public static withFields(array<string, mixed> $fields) : self
Parameters
$fields : array<string, mixed>
Return values
self

        
On this page

Search results