1 | <?php |
||
36 | class FileUploadObserver extends AbstractProductImportObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Process the observer's business logic. |
||
41 | * |
||
42 | * @return array The processed row |
||
43 | */ |
||
44 | protected function process() |
||
55 | |||
56 | /** |
||
57 | * Upload's the file with the passed name to the Magento |
||
58 | * media directory. If the file already exists, the will |
||
59 | * be given a new name that will be returned. |
||
60 | * |
||
61 | * @param string $filename The name of the file to be uploaded |
||
62 | * |
||
63 | * @return string The name of the uploaded file |
||
64 | */ |
||
65 | protected function uploadFile($filename) |
||
69 | |||
70 | /** |
||
71 | * Return's the name of the created image. |
||
72 | * |
||
73 | * @return string The name of the created image |
||
74 | */ |
||
75 | protected function getParentImage() |
||
79 | |||
80 | /** |
||
81 | * Return's TRUE if the passed image is the parent one. |
||
82 | * |
||
83 | * @param string $image The imageD to check |
||
84 | * |
||
85 | * @return boolean TRUE if the passed image is the parent one |
||
86 | */ |
||
87 | protected function isParentImage($image) |
||
91 | } |
||
92 |