PHP Class Flarum\Core\Validator\AbstractValidator

Mostrar archivo Open project: flarum/core

Protected Properties

Property Type Description
$events Illuminate\Contracts\Events\Dispatcher
$rules array
$translator Symfony\Component\Translation\TranslatorInterface
$validator Illuminate\Validation\Factory

Public Methods

Method Description
__construct ( Illuminate\Validation\Factory $validator, Illuminate\Contracts\Events\Dispatcher $events, Symfony\Component\Translation\TranslatorInterface $translator )
assertValid ( array $attributes ) Throw an exception if a model is not valid.

Protected Methods

Method Description
getMessages ( ) : array
getRules ( ) : array
makeValidator ( array $attributes ) : Illuminate\Validation\Validator Make a new validator instance for this model.

Method Details

__construct() public method

public __construct ( Illuminate\Validation\Factory $validator, Illuminate\Contracts\Events\Dispatcher $events, Symfony\Component\Translation\TranslatorInterface $translator )
$validator Illuminate\Validation\Factory
$events Illuminate\Contracts\Events\Dispatcher
$translator Symfony\Component\Translation\TranslatorInterface

assertValid() public method

Throw an exception if a model is not valid.
public assertValid ( array $attributes )
$attributes array

getMessages() protected method

protected getMessages ( ) : array
return array

getRules() protected method

protected getRules ( ) : array
return array

makeValidator() protected method

Make a new validator instance for this model.
protected makeValidator ( array $attributes ) : Illuminate\Validation\Validator
$attributes array
return Illuminate\Validation\Validator

Property Details

$events protected_oe property

protected Dispatcher,Illuminate\Contracts\Events $events
return Illuminate\Contracts\Events\Dispatcher

$rules protected_oe property

protected array $rules
return array

$translator protected_oe property

protected TranslatorInterface,Symfony\Component\Translation $translator
return Symfony\Component\Translation\TranslatorInterface

$validator protected_oe property

protected Factory,Illuminate\Validation $validator
return Illuminate\Validation\Factory