\TinCanScore

An optional field that represents the outcome of a graded Activity achieved by an actor.

Summary

Methods
Properties
Constants
fromJSON()
asVersion()
__set()
compareWithSignature()
__construct()
setScaled()
getScaled()
setRaw()
getRaw()
setMin()
getMin()
setMax()
getMax()
No public properties found
SCALE_MIN
SCALE_MAX
No protected methods found
$scaled
$raw
$min
$max
N/A
_fromArray()
doMatch()
No private properties found
N/A

Constants

SCALE_MIN

SCALE_MIN

SCALE_MAX

SCALE_MAX

Properties

$scaled

$scaled : float

Decimal number between -1 and 1, inclusive

Type

float

$raw

$raw : float

Decimal number between min and max (if present, otherwise unrestricted), inclusive

Type

float

$min

$min : float

Decimal number less than max (if present)

Type

float

$max

$max : float

Decimal number greater than min (if present)

Type

float

Methods

fromJSON()

fromJSON(  $jsonStr) 

Parameters

$jsonStr

asVersion()

asVersion(mixed  $version) : array

Collects defined object properties for a given version into an array

Parameters

mixed $version

Returns

array

__set()

__set(string  $property, mixed  $value) 

Prevent external mutation

Parameters

string $property
mixed $value

Throws

\DomainException

compareWithSignature()

compareWithSignature(mixed  $fromSig) : array

Compares the instance with a provided instance for determining whether an object received in a signature is a meaningful match

Parameters

mixed $fromSig

Returns

array

__construct()

__construct(float|array  $aRawValue = null, float  $aMin = null, float  $aMax = null, float  $aScaledValue = null) 

Constructor

Parameters

float|array $aRawValue

the raw score value, may also be an array of properties

float $aMin

the score minimum

float $aMax

the score maximum

float $aScaledValue

the scaled score

setScaled()

setScaled(float  $value) : self

Parameters

float $value

Throws

\InvalidArgumentException

Returns

self

getScaled()

getScaled() : null|float

Returns

null|float

setRaw()

setRaw(float  $value) : self

Parameters

float $value

Throws

\InvalidArgumentException

Returns

self

getRaw()

getRaw() : null|float

Returns

null|float

setMin()

setMin(float  $value) : self

Parameters

float $value

Throws

\InvalidArgumentException

Returns

self

getMin()

getMin() : null|float

Returns

null|float

setMax()

setMax(float  $value) : self

Parameters

float $value

Throws

\InvalidArgumentException

Returns

self

getMax()

getMax() : null|float

Returns

null|float

_fromArray()

_fromArray(  $options) 

Parameters

$options

doMatch()

doMatch(  $a,   $b,   $description) 

Parameters

$a
$b
$description