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

Breadcrumb

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

function Yaml::__construct

Parameters

int-mask-of<\Symfony\Component\Yaml\Yaml::PARSE_*> $flags:

string[]|null $groups:

Overrides Constraint::__construct

File

vendor/symfony/validator/Constraints/Yaml.php, line 35

Class

Yaml
@author Kev <https://github.com/symfonyaml&gt;

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(string $message = 'This value is not valid YAML.', int $flags = 0, ?array $groups = null, mixed $payload = null) {
    if (!class_exists(Parser::class)) {
        throw new LogicException('The Yaml component is required to use the Yaml constraint. Try running "composer require symfony/yaml".');
    }
    parent::__construct(null, $groups, $payload);
}

API Navigation

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