PHP Class Overtrue\Validation\Translator

Inheritance: implements Overtrue\Validation\TranslatorInterface
Afficher le fichier Open project: overtrue/validation

Protected Properties

Свойство Type Description
$defaultMessages array 默认消息.
$messages

Méthodes publiques

Méthode Description
__construct ( array $messages = [] ) 设置验证消息列表.
trans ( string $key ) : string 翻译.

Méthodes protégées

Méthode Description
arrayGet ( array $array, string $key, mixed $default = null ) : mixed 使用点字符串获取.

Method Details

__construct() public méthode

设置验证消息列表.
public __construct ( array $messages = [] )
$messages array

arrayGet() protected méthode

使用点字符串获取.
protected arrayGet ( array $array, string $key, mixed $default = null ) : mixed
$array array
$key string
$default mixed
Résultat mixed

trans() public méthode

翻译.
public trans ( string $key ) : string
$key string 点拼接的key
Résultat string

Property Details

$defaultMessages protected_oe property

默认消息.
protected array $defaultMessages
Résultat array

$messages protected_oe property

protected $messages