Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Uuid.php

function Uuid::__construct

Same name in this branch
  1. 11.1.x vendor/ramsey/uuid/src/Nonstandard/Uuid.php \Ramsey\Uuid\Nonstandard\Uuid::__construct()
  2. 11.1.x vendor/ramsey/uuid/src/Uuid.php \Ramsey\Uuid\Uuid::__construct()

Parameters

array<string,mixed>|null $options:

self::V*[]|self::V*|null $versions Specific UUID versions (defaults to {@see Uuid::ALL_VERSIONS}):

bool|null $strict Whether to force the value to follow the RFC's input format rules; pass false to allow alternate formats (defaults to true):

string[]|null $groups:

Overrides Constraint::__construct

File

vendor/symfony/validator/Constraints/Uuid.php, line 103

Class

Uuid
Validates that a value is a valid Universally unique identifier (UUID).

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(?array $options = null, ?string $message = null, array|int|null $versions = null, ?bool $strict = null, ?callable $normalizer = null, ?array $groups = null, mixed $payload = null) {
    parent::__construct($options, $groups, $payload);
    $this->message = $message ?? $this->message;
    $this->versions = (array) ($versions ?? $this->versions);
    $this->strict = $strict ?? $this->strict;
    $this->normalizer = $normalizer ?? $this->normalizer;
    if (null !== $this->normalizer && !\is_callable($this->normalizer)) {
        throw new InvalidArgumentException(\sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer)));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal