Releases: 3nr1c/structure
Releases · 3nr1c/structure
Fixed a bug with array_fill
0.6-alpha2 Fix array_fill bug
0.6-alpha
Release 0.5.2
Release 0.5.1
Bugfix with NumericS
Release 0.5.0
Changelog 0.5.0
- Compilation of strings for ArrayS, ScalarS (value sets) and NumericS (integer ranges) to avoid re-parsing
- Failure reporting: all
check
methods accept as second argument a variable to be created to return what failed, if the test evaluates tofalse
. The last occurred error can be retrieved withStructure::getLastFail()
and removed withStructure::clearLastFail()
- ArrayS: quantifiers for simple array description:
"type[*]"
,"type[+]"
,"type[10+]"
- ArrayS: multiple types for a value:
"integer|float"
,"string|null"
- ArrayS: mixed simple arrays:
"(integer|float)[]"
- ArrayS: nested simple arrays:
"integer[][]"
,"(integer[]|string[])[]"
- ScalarS:
true
andfalse
tokens can be escaped to become strings:"{\\true, \\false}"
- StringS: length test. It can be defined with
setLength
. For arrays, the syntax is"string(min..max)"
Release 0.4.3
Added quantifiers for ArrayS:
$array->setFormat("integer[*]");
$array->setFormat("string[+]");
$array->setFormat("float[3+]");
Release 0.4.2
Added $numeric attribute to IntegerS and FloatS
Release 0.4.1
Bugfix
Release 0.4
Numeric types have now infinities! They can be used in ArrayS as well.
Release 0.3
Release 0.3