Search by

h4kuna / data-type

h4kuna

Basic data type, int, float, string, set, gps

v4.0.0 2026-09-25 09:14 UTC

README

Downloads this Month Latest Stable Version Coverage Status Total Downloads License

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 type
  • InvalidArgumentsException - input data cannot be processed (date format, GPS format, ...)
  • ActiveWaitTimeoutException - ActiveWait timeout expired

Wrong usage of the library throws h4kuna\DataType\Exceptions\LogicException, do not catch it, fix the code.