You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use composer to install the symfony/validator library.
Generate an autoload file (composer dump-autoload).
Include autoload.php in your project.
Demonstrate how the validator works (in your project) using examples from the documentation.
Create a class Employee, which in the constructor takes id
employee, name, salary, date of employment. Add a method that returns the employee's current work experience (number full years). For each property create your own rules validation rules for each property. Create several users and demonstrate the validator's work.
Create a Department class, which in its constructor takes an array
Employee class objects (employees) and name. Add a method, that returns the total amount of employees' salaries. Create several objects of the Department class, place them in array/collection. Output the departments with the smallest and with the largest of the total wages. If several departments have If several departments have the same total salary, output the department that has the most employees (if this index is also the same - output all such departments).