Eno\Loaders ยป integer

integer() โ†’ int
integerItems() โ†’ array
integerList() โ†’ array

Accepts integers only (float is not clipped but triggers an error), returns an integer.

enogood: -13
bad: 0.3
php$document = Parser::parse($input);

$document->integer('good');  // returns -13

$document->integer('bad');
  // throws a ValidationError: 'bad' must contain an integer, for instance '42' or '-21'.