1 | <?php |
||
34 | class SimpleDateConverter implements DateConverterInterface |
||
35 | { |
||
36 | |||
37 | /** |
||
38 | * The subject configuraiton instance. |
||
39 | * |
||
40 | * @var \TechDivision\Import\Configuration\SubjectConfigurationInterface |
||
41 | */ |
||
42 | private $subjectConfiguration; |
||
43 | |||
44 | /** |
||
45 | * Sets the subject configuration instance. |
||
46 | * |
||
47 | * @param \TechDivision\Import\Configuration\SubjectConfigurationInterface $subjectConfiguration The subject configuration |
||
48 | * |
||
49 | * @return void |
||
50 | */ |
||
51 | public function setSubjectConfiguration(SubjectConfigurationInterface $subjectConfiguration) |
||
55 | |||
56 | /** |
||
57 | * Returns the subject configuration instance. |
||
58 | * |
||
59 | * @return \TechDivision\Import\Configuration\SubjectConfigurationInterface The subject configuration |
||
60 | */ |
||
61 | public function getSubjectConfiguration() |
||
65 | |||
66 | /** |
||
67 | * Returns the date converter configuration instance. |
||
68 | * |
||
69 | * @return \TechDivision\Import\Configuration\Subject\DateConverterConfigurationInterface The date converter configuration |
||
70 | */ |
||
71 | 2 | protected function getDateConverterConfiguration() |
|
75 | |||
76 | /** |
||
77 | * Converts the passed date into a Magento 2 compatible date format. |
||
78 | * |
||
79 | * @param string $date The date to convert |
||
80 | * @param string $format The date format to convert to |
||
81 | * |
||
82 | * @return string The converted date |
||
83 | */ |
||
84 | 2 | public function convert($date, $format = 'Y-m-d H:i:s') |
|
106 | } |
||
107 |