1 | <?php |
||
14 | class FieldNoteService |
||
15 | { |
||
16 | use ErrorTrait; |
||
17 | |||
18 | const FIELD_NOTE_DATETIME_FORMAT = 'Y-m-d\TH:i:s\Z'; |
||
19 | const LOG_TYPE = [ |
||
20 | 'Found it' => 1, |
||
21 | "Didn't find it" => 2, |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * @var \Doctrine\ORM\EntityManagerInterface |
||
26 | */ |
||
27 | protected $entityManager; |
||
28 | |||
29 | /** |
||
30 | * @var \Symfony\Component\Translation\TranslatorInterface |
||
31 | */ |
||
32 | protected $translator; |
||
33 | |||
34 | /** |
||
35 | * FieldNoteService constructor. |
||
36 | * |
||
37 | * @param \Doctrine\ORM\EntityManagerInterface $entityManager |
||
38 | * @param \Symfony\Component\Translation\TranslatorInterface $translator |
||
39 | */ |
||
40 | public function __construct(EntityManagerInterface $entityManager, TranslatorInterface $translator) |
||
45 | |||
46 | /** |
||
47 | * @param string $fileName |
||
48 | * @param int $userId |
||
49 | * |
||
50 | * @return bool |
||
51 | * @throws \AppBundle\Exception\WrongFileFormatException |
||
52 | */ |
||
53 | public function importFromFile($fileName, $userId) |
||
104 | } |
||
105 |