api/symfony/Component/Validator/Violation/ConstraintViolationBuilder.yaml
2024-09-26 02:03:21 -07:00

81 lines
3 KiB
YAML

name: ConstraintViolationBuilder
class_comment: '# * Default implementation of {@link ConstraintViolationBuilderInterface}.
# *
# * @author Bernhard Schussek <bschussek@gmail.com>
# *
# * @internal'
dependencies:
- name: Constraint
type: class
source: Symfony\Component\Validator\Constraint
- name: ConstraintViolation
type: class
source: Symfony\Component\Validator\ConstraintViolation
- name: ConstraintViolationList
type: class
source: Symfony\Component\Validator\ConstraintViolationList
- name: PropertyPath
type: class
source: Symfony\Component\Validator\Util\PropertyPath
- name: TranslatorInterface
type: class
source: Symfony\Contracts\Translation\TranslatorInterface
properties: []
methods:
- name: disableTranslation
visibility: public
parameters: []
comment: "# * Default implementation of {@link ConstraintViolationBuilderInterface}.\n\
# *\n# * @author Bernhard Schussek <bschussek@gmail.com>\n# *\n# * @internal\n\
# */\n# class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface\n\
# {\n# private string $propertyPath;\n# private ?int $plural = null;\n# private\
\ ?string $code = null;\n# private mixed $cause = null;\n# \n# public function\
\ __construct(\n# private ConstraintViolationList $violations,\n# private ?Constraint\
\ $constraint,\n# private string|\\Stringable $message,\n# private array $parameters,\n\
# private mixed $root,\n# ?string $propertyPath,\n# private mixed $invalidValue,\n\
# private TranslatorInterface $translator,\n# private string|false|null $translationDomain\
\ = null,\n# ) {\n# $this->propertyPath = $propertyPath ?? '';\n# }\n# \n# public\
\ function atPath(string $path): static\n# {\n# $this->propertyPath = PropertyPath::append($this->propertyPath,\
\ $path);\n# \n# return $this;\n# }\n# \n# public function setParameter(string\
\ $key, string $value): static\n# {\n# $this->parameters[$key] = $value;\n# \n\
# return $this;\n# }\n# \n# public function setParameters(array $parameters):\
\ static\n# {\n# $this->parameters = $parameters;\n# \n# return $this;\n# }\n\
# \n# public function setTranslationDomain(string $translationDomain): static\n\
# {\n# $this->translationDomain = $translationDomain;\n# \n# return $this;\n#\
\ }\n# \n# /**\n# * @return $this"
- name: setInvalidValue
visibility: public
parameters:
- name: invalidValue
comment: null
- name: setPlural
visibility: public
parameters:
- name: number
comment: null
- name: setCode
visibility: public
parameters:
- name: code
comment: null
- name: setCause
visibility: public
parameters:
- name: cause
comment: null
- name: addViolation
visibility: public
parameters: []
comment: null
traits:
- Symfony\Component\Validator\Constraint
- Symfony\Component\Validator\ConstraintViolation
- Symfony\Component\Validator\ConstraintViolationList
- Symfony\Component\Validator\Util\PropertyPath
- Symfony\Contracts\Translation\TranslatorInterface
interfaces:
- ConstraintViolationBuilderInterface