188 if ($picture_id >= 0) {
189 $this->picture_or_definition_id = $picture_id;
202 if ($definition_id >= 0) {
203 $this->picture_or_definition_id = $definition_id;
216 $this->picture_or_definition = $picture;
228 $this->picture_or_definition = $definition;
248 ): array|float|bool|
int|string|null
264 $clone = clone $this;
265 $clone->setPoints($transformations->
float($normalized[
'points']));
266 $clone->setPicture($transformations->
string($normalized[
'picture_or_definition']));
267 $clone->setPictureId($transformations->
int($normalized[
'picture_or_definition_id']));
268 $clone->setTermId($transformations->
int($normalized[
'term_id']));
Class for matching question answers.
__construct( $points=0.0, $term_id=0, $picture_or_definition="", $picture_or_definition_id=0)
ASS_AnswerMatching constructor.
setDefinition(string $definition="")
Sets the definition Sets the definition.
setPicture(string $picture="")
Sets the picture Sets the picture.
setPictureId(int $picture_id=0)
Sets the picture id Sets the nonnegative picture identifier which can be used for sorting or displayi...
getTermId()
Gets the term id.
fromNormalized(array $normalized, Transformations $transformations)
Restore the object from its normalized representation.
$picture_or_definition_id
setPoints(float $points=0.0)
Sets the points Sets the points given for selecting the answer.
setDefinitionId(int $definition_id=0)
Sets the definition id Sets the nonnegative definition identifier which can be used for sorting or di...
getPictureId()
Gets the picture identifier.
getPicture()
Gets the picture.
getPoints()
Gets the points.
getDefinition()
Gets the definition.
toNormalized(Transformations $transformations, array $context=[])
Convert the internal state of the implementing object into a language-neutral array structure.
setTermId($term_id=0)
Sets the term id.
getDefinitionId()
Gets the definition identifier.