Maslosoft Addendum API
Class ConflictsAnnotation
Disallow annotation if some other annotation exists. This is to avoid using conflicting annotations.
This annotation can only be used on other annotation classes. Only annotation name should be used here, not annotation class name.
Do not use class literals here. Only annotation name as string is recommended.
Assume we are defining MyAnnotation
annotation, and want to forbid
using this annotation with CombinedAnnotation
.
To achieve this use Conflicts
annotation:
```
- Maslosoft\Addendum\Annotation implements Maslosoft\Addendum\Interfaces\AnnotationInterface uses Maslosoft\Addendum\Traits\MetaState
- Maslosoft\Addendum\Collections\MetaAnnotation implements Maslosoft\Addendum\Interfaces\MetaAnnotationInterface
- Maslosoft\Addendum\Annotations\ConflictsAnnotation
Conflicts('combined'): ```
Target(\maslosoft\addendum\interfaces\annotationinterface)
Template: Conflicts('${annotation}')
See:
Maslosoft\Addendum\Interfaces\AnnotationInterface
Located at Annotations/ConflictsAnnotation.php
Methods inherited from Maslosoft\Addendum\Collections\MetaAnnotation
afterInit()
,
getEntity()
,
getMeta()
,
setEntity()
,
setMeta()
,
setName()