Menu

Maslosoft Mangan Logo Maslosoft Mangan Documentation
MongoDB Object Persister

Edit

Date Sanitizer

Date sanitizers will ensure that value is MongoDate. This sanitizer will not be autodetected and need to be explicitly set.

Full example of using DateSanitizer:

use Maslosoft\Addendum\Interfaces\AnnotatedInterface
use Maslosoft\Mangan\Sanitizers\DateSanitizer;

class MyClass implements AnnotatedInterface
{
    /**
    * @Sanitizer(DateSanitizer)
    */
    public $date = null;
}