Menu

Maslosoft Mangan Logo Maslosoft Mangan Documentation
MongoDB Object Persister

Edit

None Sanitizer

None sanitizer will disable any sanitization. Use this sanitizer if property has default value but sanitization should not be performed. However in such case it is better to create custom sanitizer.

If property does not have default value, or it's default vale is null, it will not be sanitized - equivalent to use None Full example of using None:

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

class MyClass implements AnnotatedInterface
{
    public $autodetected;

    /**
    * @Sanitizer(None)
    */
    public $explicitlySet;
}