UserValidator
in package
FinalYes
Service.
Table of Contents
Properties
Methods
- __construct() : mixed
- The constructor.
- validateUser() : void
- Validate new user.
- validateUserUpdate() : void
- Validate update.
- createValidator() : Validator
- Create validator.
Properties
$repository
private
UserRepository
$repository
$validationFactory
private
ValidationFactory
$validationFactory
Methods
__construct()
The constructor.
public
__construct(UserRepository $repository, ValidationFactory $validationFactory) : mixed
Parameters
- $repository : UserRepository
-
The repository
- $validationFactory : ValidationFactory
-
The validation
validateUser()
Validate new user.
public
validateUser(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
-
The data
Tags
validateUserUpdate()
Validate update.
public
validateUserUpdate(int $userId, array<string|int, mixed> $data) : void
Parameters
- $userId : int
-
The user id
- $data : array<string|int, mixed>
-
The data
createValidator()
Create validator.
private
createValidator() : Validator
Return values
Validator —The validator