Вход Регистрация
Файл: concrete5.7.5.6/concrete/src/Validator/TranslatableValidatorInterface.php
Строк: 56
<?php
namespace ConcreteCoreValidator;

/**
 * Interface TranslatableValidatorInterface
 * A modifier to the standard validator interface that enables translatable requirements and errors
 *
 * @package ConcreteCoreValidator
 */
interface TranslatableValidatorInterface extends ValidatorInterface
{

    
/**
     * Set the requirement string to a mixed value
     * Closure format:
     *    function(TranslatableValidatorInterface $validator, int $code): string
     *
     * @param int             $code    The error code
     * @param string|Closure $message Either a plain string, or a closure that returns a string
     * @return void
     */
    
public function setRequirementString($code$message);

    
/**
     * Set the error string to a string or to a closure
     * Closure format:
     *    function(TranslatableValidatorInterface $validator, int $code, mixed $passed): string
     *
     * where `$passed` is whatever was passed to `ValidatorInterface::isValid`
     *
     * @param int             $code    The error code
     * @param string|Closure $message Either a plain string, or a closure that returns a string
     * @return void
     */
    
public function setErrorString($code$message);

}
Онлайн: 2
Реклама