\TinCanVersion

TinCan API Version

Summary

Methods
Properties
Constants
hasValue()
hasAnyValue()
isLatest()
isSupported()
__toString()
__callStatic()
fromString()
supported()
latest()
No public properties found
V101
V100
V095
No protected methods found
No protected properties found
N/A
__construct()
$supported
$instances
$value
N/A

Constants

V101

V101

V100

V100

V095

V095

Properties

$supported

$supported : array

Type

array — string => bool

$instances

$instances : array<mixed,self>

Type

array<mixed,self>

$value

$value : string

Type

string

Methods

hasValue()

hasValue(string  $aValue) : boolean

Does the value match?

Parameters

string $aValue

a value to check

Returns

boolean

hasAnyValue()

hasAnyValue(array<mixed,string>  $aValueList) : boolean

Is the value contained in a list of versions?

Parameters

array<mixed,string> $aValueList

a list of values to check

Returns

boolean

isLatest()

isLatest() : boolean

Is this the latest version?

Returns

boolean

isSupported()

isSupported() : boolean

Is this a supported version?

Returns

boolean

__toString()

__toString() : string

Convert the object to a string

Returns

string

__callStatic()

__callStatic(string  $aValue, array  $arguments = array()) : self

Factory constructor

Parameters

string $aValue

the called method as a version value

array $arguments

unused arguments passed to the method

Returns

self

Examples

= Version::V101();
** File not found : $version **

fromString()

fromString(string  $aValue) : self

Convert a string into a Version instance

Parameters

string $aValue

a version value

Returns

self

supported()

supported() : array<mixed,string>

List all supported versions

Returns

array<mixed,string>

latest()

latest() : string

Retrieve the most recent version

Returns

string

__construct()

__construct(string  $aValue) 

Constructor

Parameters

string $aValue

a version value

Throws

\InvalidArgumentException

when the value is not recognized