Maslosoft Mangan API
Class SanitizerAnnotation
Use Sanitizer
annotation to enforce particular data type.
There are numerous built-in sanitizers which can be used, as well as any custom sanitizer can be build. First annotation value must be sanitizer class literal, class name as string or short string literal based for built-in sanitizers. Some sanitizers can also have some parameters. To get list of parameters, read particular sanitizer documentation.
Note: There can be only one sanitizer per field.
Example usage: ```
- Maslosoft\Addendum\Collections\MetaAnnotation
- Maslosoft\Mangan\Meta\ManganAnnotation
- Maslosoft\Mangan\Meta\ManganPropertyAnnotation
- Maslosoft\Mangan\Annotations\SanitizerAnnotation
Direct known subclasses
Namespace: Maslosoft\Mangan\Annotations
Sanitizer(mongoobjectid):
Sanitizer('mongoobjectid'):
Sanitizer(none)
Sanitizer('none'): Example of using sanitizer with parameters:
Sanitizer(mongoobjectid,:
Template: Sanitizer(${SanitizerClass})
Target('property')
Author: Piotr Maselkowski
Located at Annotations/SanitizerAnnotation.php
Sanitizer(mongoobjectid):
For built-in sanitizers, also short string notation can be used, without importing class:
Sanitizer('mongoobjectid'):
To skip variable sanitization either make default value `null` or define `None` sanitizer:
Sanitizer(none)
Sanitizer('none'): Example of using sanitizer with parameters:
Sanitizer(mongoobjectid,:
nullable = true) ```
Template: Sanitizer(${SanitizerClass})
Target('property')
Author: Piotr Maselkowski
Located at Annotations/SanitizerAnnotation.php
Methods inherited from Maslosoft\Mangan\Meta\ManganPropertyAnnotation
Methods inherited from Maslosoft\Mangan\Meta\ManganAnnotation
API documentation generated by ApiGen