PHP Класс Overtrue\Validation\Factory

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$extensions array All of the custom validator extensions.
$fallbackMessages array All of the fallback messages for custom rules.
$implicitExtensions array All of the custom implicit validator extensions.
$replacers array All of the custom validator message replacers.
$resolver Closure The Validator resolver instance.
$translator Overtrue\Validation\TranslatorInterface The Translator implementation.
$verifier Overtrue\Validation\PresenceVerifierInterface The Presence Verifier implementation.

Открытые методы

Метод Описание
__construct ( Overtrue\Validation\TranslatorInterface $translator = null ) : Factory Create a new Validator factory instance.
extend ( string $rule, Closure | string $extension, string $message = null ) Register a custom validator extension.
extendImplicit ( string $rule, Closure | string $extension, string $message = null ) Register a custom implicit validator extension.
getPresenceVerifier ( ) : Overtrue\Validation\PresenceVerifierInterface Get the Presence Verifier implementation.
getTranslator ( ) : Overtrue\Validation\TranslatorInterface Get the Translator implementation.
make ( array $data, array $rules, array $messages = [], array $customAttributes = [] ) : Validator Create a new Validator instance.
replacer ( string $rule, Closure | string $replacer ) Register a custom implicit validator message replacer.
resolver ( Closure $resolver ) Set the Validator instance resolver.
setPresenceVerifier ( Overtrue\Validation\PresenceVerifierInterface $presenceVerifier ) Set the Presence Verifier implementation.

Защищенные методы

Метод Описание
addExtensions ( Validator $validator ) Add the extensions to a validator instance.
resolve ( array $data, array $rules, array $messages, array $customAttributes ) : Validator Resolve a new Validator instance.

Описание методов

__construct() публичный Метод

Create a new Validator factory instance.
public __construct ( Overtrue\Validation\TranslatorInterface $translator = null ) : Factory
$translator Overtrue\Validation\TranslatorInterface
Результат Factory

addExtensions() защищенный Метод

Add the extensions to a validator instance.
protected addExtensions ( Validator $validator )
$validator Validator

extend() публичный Метод

Register a custom validator extension.
public extend ( string $rule, Closure | string $extension, string $message = null )
$rule string
$extension Closure | string
$message string

extendImplicit() публичный Метод

Register a custom implicit validator extension.
public extendImplicit ( string $rule, Closure | string $extension, string $message = null )
$rule string
$extension Closure | string
$message string

getPresenceVerifier() публичный Метод

Get the Presence Verifier implementation.
public getPresenceVerifier ( ) : Overtrue\Validation\PresenceVerifierInterface
Результат Overtrue\Validation\PresenceVerifierInterface

getTranslator() публичный Метод

Get the Translator implementation.
public getTranslator ( ) : Overtrue\Validation\TranslatorInterface
Результат Overtrue\Validation\TranslatorInterface

make() публичный Метод

Create a new Validator instance.
public make ( array $data, array $rules, array $messages = [], array $customAttributes = [] ) : Validator
$data array
$rules array
$messages array
$customAttributes array
Результат Validator

replacer() публичный Метод

Register a custom implicit validator message replacer.
public replacer ( string $rule, Closure | string $replacer )
$rule string
$replacer Closure | string

resolve() защищенный Метод

Resolve a new Validator instance.
protected resolve ( array $data, array $rules, array $messages, array $customAttributes ) : Validator
$data array
$rules array
$messages array
$customAttributes array
Результат Validator

resolver() публичный Метод

Set the Validator instance resolver.
public resolver ( Closure $resolver )
$resolver Closure

setPresenceVerifier() публичный Метод

Set the Presence Verifier implementation.
public setPresenceVerifier ( Overtrue\Validation\PresenceVerifierInterface $presenceVerifier )
$presenceVerifier Overtrue\Validation\PresenceVerifierInterface

Описание свойств

$extensions защищенное свойство

All of the custom validator extensions.
protected array $extensions
Результат array

$fallbackMessages защищенное свойство

All of the fallback messages for custom rules.
protected array $fallbackMessages
Результат array

$implicitExtensions защищенное свойство

All of the custom implicit validator extensions.
protected array $implicitExtensions
Результат array

$replacers защищенное свойство

All of the custom validator message replacers.
protected array $replacers
Результат array

$resolver защищенное свойство

The Validator resolver instance.
protected Closure $resolver
Результат Closure

$translator защищенное свойство

The Translator implementation.
protected TranslatorInterface,Overtrue\Validation $translator
Результат Overtrue\Validation\TranslatorInterface

$verifier защищенное свойство

The Presence Verifier implementation.
protected PresenceVerifierInterface,Overtrue\Validation $verifier
Результат Overtrue\Validation\PresenceVerifierInterface