/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Validation/ValidationResult.php
49 строк
983 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2017 Adobe * All Rights Reserved. */ namespace Magento\Framework\Validation; /** * ValidationResult object supposed to be created by dedicated validator service which makes a validation and checks * whether all entity invariants (business rules that always should be fulfilled) are valid. * * ValidationResult represents a container storing all the validation errors that happened during the entity validation. * * @api * @since 101.0.7 */ class ValidationResult { /** * @var array */ private $errors = []; /** * @param array $errors */ public function __construct(array $errors) { $this->errors = $errors; } /** * @return bool * @since 101.0.7 */ public function isValid(): bool { return empty($this->errors); } /** * @return array * @since 101.0.7 */ public function getErrors(): array { return $this->errors; } }