h4kuna / data-type
Basic data type, int, float, string, set, gps
v4.0.0
2026-09-25 09:14 UTC
Requires
- php: >=8.2
- ext-mbstring: *
- nette/utils: ^3.2.8 || ^4.0
Requires (Dev)
- nette/tester: ^2.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- shipmonk/coding-standard: ^0.2
- tracy/tracy: ^2.9
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-25 11:05:33 UTC
README
Part of the h4kuna PHP libraries, see the overview of all packages.
Installation by composer
$ composer require h4kuna/data-type
Requires PHP 8.2.
- Basic - Arrays, BitwiseOperations, Bools, Floats, Integer, Lists, Set, Strings
- Collection - Counter, LazyBuilder, StrictTypeArray, JsonToHtml
- Date - Czech Calendar, Easter, Parser, Time, Convert, Interval, Sleep
- Iterators - TextIterator, CsvIterator, FlattenArrayRecursiveIterator, PeriodDayFactory, ActiveWait, ReverseIterator
- Location - Gps
- Number - Math, RomeNumber
Exceptions
All runtime exceptions extend h4kuna\DataType\Exceptions\DataTypeException (a RuntimeException):
InvalidTypeException- a value cannot be converted to the requested typeInvalidArgumentsException- input data cannot be processed (date format, GPS format, ...)ActiveWaitTimeoutException-ActiveWaittimeout expired
Wrong usage of the library throws h4kuna\DataType\Exceptions\LogicException, do not catch it, fix the code.