Maslosoft Mangan Documentation
MongoDB Object Persister
Edit
Double Sanitizer
Double sanitizer will ensure that value is numeric and it is floating point number.
It is recommended to use either default value of some floating point number (ie. 0.0
) to
auto set this sanitizer or explicitly define it with class literal.
Full example of using DoubleSanitizer
:
use Maslosoft\Addendum\Interfaces\AnnotatedInterface use Maslosoft\Mangan\Sanitizers\DoubleSanitizer; class MyClass implements AnnotatedInterface { public $autodetected = 0.0; /** * @Sanitizer(DoubleSanitizer) */ public $explicitlySet; }