1 | <?php |
||
36 | class GenericValidatorObserver extends AbstractObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The registry processor instance. |
||
41 | * |
||
42 | * @var \TechDivision\Import\Services\RegistryProcessorInterface |
||
43 | */ |
||
44 | protected $registryProcessor; |
||
45 | |||
46 | /** |
||
47 | * Initializes the callback with the loader instance. |
||
48 | * |
||
49 | * @param \TechDivision\Import\Services\RegistryProcessorInterface $registryProcessor The registry processor instance |
||
50 | */ |
||
51 | public function __construct(RegistryProcessorInterface $registryProcessor) |
||
55 | |||
56 | /** |
||
57 | * Will be invoked by the action on the events the listener has been registered for. |
||
58 | * |
||
59 | * @param \TechDivision\Import\Subjects\SubjectInterface $subject The subject instance |
||
60 | * |
||
61 | * @return array The modified row |
||
62 | * @see \TechDivision\Import\Observers\ObserverInterface::handle() |
||
63 | */ |
||
64 | public function handle(SubjectInterface $subject) |
||
77 | |||
78 | /** |
||
79 | * Process the observer's business logic. |
||
80 | * |
||
81 | * @return void |
||
82 | */ |
||
83 | protected function process() |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getEmptyAttributeValueConstant() |
||
130 | |||
131 | /** |
||
132 | * Map the passed attribute code, if a header mapping exists and return the |
||
133 | * mapped mapping. |
||
134 | * |
||
135 | * @param string $attributeCode The attribute code to map |
||
136 | * |
||
137 | * @return string The mapped attribute code, or the original one |
||
138 | */ |
||
139 | protected function mapAttributeCodeByHeaderMapping($attributeCode) |
||
143 | |||
144 | /** |
||
145 | * Return's the array with callbacks for the passed type. |
||
146 | * |
||
147 | * @param string $type The type of the callbacks to return |
||
148 | * |
||
149 | * @return array The callbacks |
||
150 | */ |
||
151 | protected function getCallbacksByType($type) |
||
155 | } |
||
156 |