\Dewdrop\FilterNullableDbInteger

This filter is intended to assist with DB integer fields that are allowed to be nullable.

Summary

Methods
Properties
Constants
filter()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

filter()

filter(mixed  $value) : integer|null

For empty strings (think HTTP requests, where everything is a string), or actual nulls, we return null. If not, we return the value cast to an int.

Parameters

mixed $value

Returns

integer|null