Skip to content

Kokurcho/PIUS_lab1

Repository files navigation

PHP Lab 1

Technologies

  • PHP
  • Composer
  • Symfony-validator

Task

  • 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).

About

PHP, Composer, Symfony-validator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages