Commit 163acab67325a739266b36e5f56efb7f91c7b748
1 parent
3ccab425
Exists in
2.9
and in
2 other branches
Configura factory para 2021
Showing
2 changed files
with
22 additions
and
0 deletions
Show diff stats
app/Services/Educacenso/ImportServiceFactory.php
... | ... | @@ -5,6 +5,7 @@ namespace App\Services\Educacenso; |
5 | 5 | use App\Exceptions\Educacenso\NotImplementedYear; |
6 | 6 | use App\Services\Educacenso\Version2019\ImportService as ImportService2019; |
7 | 7 | use App\Services\Educacenso\Version2020\ImportService as ImportService2020; |
8 | +use App\Services\Educacenso\Version2021\ImportService as ImportService2021; | |
8 | 9 | use DateTime; |
9 | 10 | |
10 | 11 | class ImportServiceFactory |
... | ... | @@ -40,6 +41,7 @@ class ImportServiceFactory |
40 | 41 | $imports = [ |
41 | 42 | 2019 => ImportService2019::class, |
42 | 43 | 2020 => ImportService2020::class, |
44 | + 2021 => ImportService2021::class, | |
43 | 45 | ]; |
44 | 46 | |
45 | 47 | if (isset($imports[$year])) { | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +<?php | |
2 | + | |
3 | + | |
4 | +namespace App\Services\Educacenso\Version2021; | |
5 | + | |
6 | + | |
7 | +use App\Services\Educacenso\Version2020\ImportService as ImportServiceVersion2020; | |
8 | + | |
9 | +class ImportService extends ImportServiceVersion2020 | |
10 | +{ | |
11 | + /** | |
12 | + * Retorna o ano a que o service se refere | |
13 | + * | |
14 | + * @return int | |
15 | + */ | |
16 | + public function getYear() | |
17 | + { | |
18 | + return 2021; | |
19 | + } | |
20 | +} | ... | ... |