-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathUnique.php
51 lines (47 loc) · 1.34 KB
/
Unique.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types=1);
namespace Doctrine\Bundle\MongoDBBundle\Validator\Constraints;
use Attribute;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* Constraint for the unique document validator
*
* @Annotation
* @Target({"CLASS", "ANNOTATION"})
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
class Unique extends UniqueEntity
{
/**
* @param string[]|string $fields The combination of fields that must contain unique values or a set of options
* @param bool|string[]|string $ignoreNull The combination of fields that ignore null values
* @param mixed $payload
*/
public function __construct(
$fields,
?string $message = null,
string $service = 'doctrine_odm.mongodb.unique',
?string $em = null,
?string $entityClass = null,
?string $repositoryMethod = null,
?string $errorPath = null,
$ignoreNull = null,
?array $groups = null,
$payload = null,
array $options = []
) {
parent::__construct(
$fields,
$message,
$service,
$em,
$entityClass,
$repositoryMethod,
$errorPath,
$ignoreNull,
$groups,
$payload,
$options,
);
}
}