Все переписано на фасады

This commit is contained in:
2024-09-03 15:41:45 +03:00
parent 74ba48620c
commit 48b4d6cccf
34 changed files with 1036 additions and 807 deletions

View File

@ -0,0 +1,33 @@
<?php
namespace ContingentParser\Parser;
class ContingentRow
{
public function __construct(
private string $eduCode,
private string $eduName,
private string $eduLevel,
private string $eduForm,
private int $contingent
) {
if ($contingent < 0) {
throw new \Exception("Недействительная численность обучающихся!");
}
$this->eduCode = trim($eduCode);
$this->eduName = trim($eduName);
$this->eduLevel = trim($eduLevel);
$this->eduForm = trim($eduForm);
$this->contingent = $contingent;
}
public function getData() : array
{
return [
"spec_code" => $this->eduCode,
"spec_name" => $this->eduName,
"edu_level" => $this->eduLevel,
"edu_forms"=> $this->eduForm,
"contingent" => $this->contingent
];
}
}