@@ -220,7 +220,7 @@ |
||
| 220 | 220 | * |
| 221 | 221 | * @param string $utilityClassName The utility class name |
| 222 | 222 | * |
| 223 | - * @return void |
|
| 223 | + * @return string |
|
| 224 | 224 | */ |
| 225 | 225 | public function setUtilityClassName($utilityClassName) |
| 226 | 226 | { |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * Factory method to create a new product link processor instance. |
| 59 | 59 | * |
| 60 | 60 | * @param \PDO $connection The PDO connection to use |
| 61 | - * @param TechDivision\Import\ConfigurationInterface $configuration The subject configuration |
|
| 61 | + * @param SubjectInterface $configuration The subject configuration |
|
| 62 | 62 | * |
| 63 | 63 | * @return \TechDivision\Import\Product\Link\Services\ProducLinkProcessor The processor instance |
| 64 | 64 | */ |
@@ -39,9 +39,9 @@ |
||
| 39 | 39 | * Factory method to create a new import processor instance. |
| 40 | 40 | * |
| 41 | 41 | * @param \PDO $connection The PDO connection to use |
| 42 | - * @param TechDivision\Import\ConfigurationInterface $configuration The subject configuration |
|
| 42 | + * @param ConfigurationInterface $configuration The subject configuration |
|
| 43 | 43 | * |
| 44 | - * @return object The processor instance |
|
| 44 | + * @return RegistryProcessor The processor instance |
|
| 45 | 45 | */ |
| 46 | 46 | public static function factory(\PDO $connection, ConfigurationInterface $configuration) |
| 47 | 47 | { |
@@ -55,68 +55,68 @@ |
||
| 55 | 55 | |
| 56 | 56 | // initialize the command with the required/optional options |
| 57 | 57 | $this->setName('import:products') |
| 58 | - ->setDescription('Imports products in the configured Magento 2 instance') |
|
| 59 | - ->addOption( |
|
| 60 | - InputOptionKeys::CONFIGURATION, |
|
| 61 | - null, |
|
| 62 | - InputOption::VALUE_REQUIRED, |
|
| 63 | - 'Specify the pathname to the configuration file to use', |
|
| 64 | - sprintf('%s/example/ce/212/conf/techdivision-import.json', getcwd()) |
|
| 65 | - ) |
|
| 66 | - ->addOption( |
|
| 67 | - InputOptionKeys::INSTALLATION_DIR, |
|
| 68 | - null, |
|
| 69 | - InputOption::VALUE_REQUIRED, |
|
| 70 | - 'The Magento installation directory to which the files has to be imported' |
|
| 71 | - ) |
|
| 72 | - ->addOption( |
|
| 73 | - InputOptionKeys::UTILITY_CLASS_NAME, |
|
| 74 | - null, |
|
| 75 | - InputOption::VALUE_REQUIRED, |
|
| 76 | - 'The utility class name with the SQL statements' |
|
| 77 | - ) |
|
| 78 | - ->addOption( |
|
| 79 | - InputOptionKeys::PREFIX, |
|
| 80 | - null, |
|
| 81 | - InputOption::VALUE_REQUIRED, |
|
| 82 | - 'The prefix of the CSV source file(s) that has/have to be imported' |
|
| 83 | - ) |
|
| 84 | - ->addOption( |
|
| 85 | - InputOptionKeys::MAGENTO_EDITION, |
|
| 86 | - null, |
|
| 87 | - InputOption::VALUE_REQUIRED, |
|
| 88 | - 'The Magento edition to be used, either one of CE or EE' |
|
| 89 | - ) |
|
| 90 | - ->addOption( |
|
| 91 | - InputOptionKeys::MAGENTO_VERSION, |
|
| 92 | - null, |
|
| 93 | - InputOption::VALUE_REQUIRED, |
|
| 94 | - 'The Magento version to be used, e. g. 2.1.2' |
|
| 95 | - ) |
|
| 96 | - ->addOption( |
|
| 97 | - InputOptionKeys::SOURCE_DATE_FORMAT, |
|
| 98 | - null, |
|
| 99 | - InputOption::VALUE_REQUIRED, |
|
| 100 | - 'The date format used in the CSV file(s)' |
|
| 101 | - ) |
|
| 102 | - ->addOption( |
|
| 103 | - InputOptionKeys::DB_PDO_DSN, |
|
| 104 | - null, |
|
| 105 | - InputOption::VALUE_REQUIRED, |
|
| 106 | - 'The DSN used to connect to the Magento database where the data has to be imported, e. g. mysql:host=127.0.0.1;dbname=magento' |
|
| 107 | - ) |
|
| 108 | - ->addOption( |
|
| 109 | - InputOptionKeys::DB_USERNAME, |
|
| 110 | - null, |
|
| 111 | - InputOption::VALUE_REQUIRED, |
|
| 112 | - 'The username used to connect to the Magento database' |
|
| 113 | - ) |
|
| 114 | - ->addOption( |
|
| 115 | - InputOptionKeys::DB_PASSWORD, |
|
| 116 | - null, |
|
| 117 | - InputOption::VALUE_REQUIRED, |
|
| 118 | - 'The password used to connect to the Magento database' |
|
| 119 | - ); |
|
| 58 | + ->setDescription('Imports products in the configured Magento 2 instance') |
|
| 59 | + ->addOption( |
|
| 60 | + InputOptionKeys::CONFIGURATION, |
|
| 61 | + null, |
|
| 62 | + InputOption::VALUE_REQUIRED, |
|
| 63 | + 'Specify the pathname to the configuration file to use', |
|
| 64 | + sprintf('%s/example/ce/212/conf/techdivision-import.json', getcwd()) |
|
| 65 | + ) |
|
| 66 | + ->addOption( |
|
| 67 | + InputOptionKeys::INSTALLATION_DIR, |
|
| 68 | + null, |
|
| 69 | + InputOption::VALUE_REQUIRED, |
|
| 70 | + 'The Magento installation directory to which the files has to be imported' |
|
| 71 | + ) |
|
| 72 | + ->addOption( |
|
| 73 | + InputOptionKeys::UTILITY_CLASS_NAME, |
|
| 74 | + null, |
|
| 75 | + InputOption::VALUE_REQUIRED, |
|
| 76 | + 'The utility class name with the SQL statements' |
|
| 77 | + ) |
|
| 78 | + ->addOption( |
|
| 79 | + InputOptionKeys::PREFIX, |
|
| 80 | + null, |
|
| 81 | + InputOption::VALUE_REQUIRED, |
|
| 82 | + 'The prefix of the CSV source file(s) that has/have to be imported' |
|
| 83 | + ) |
|
| 84 | + ->addOption( |
|
| 85 | + InputOptionKeys::MAGENTO_EDITION, |
|
| 86 | + null, |
|
| 87 | + InputOption::VALUE_REQUIRED, |
|
| 88 | + 'The Magento edition to be used, either one of CE or EE' |
|
| 89 | + ) |
|
| 90 | + ->addOption( |
|
| 91 | + InputOptionKeys::MAGENTO_VERSION, |
|
| 92 | + null, |
|
| 93 | + InputOption::VALUE_REQUIRED, |
|
| 94 | + 'The Magento version to be used, e. g. 2.1.2' |
|
| 95 | + ) |
|
| 96 | + ->addOption( |
|
| 97 | + InputOptionKeys::SOURCE_DATE_FORMAT, |
|
| 98 | + null, |
|
| 99 | + InputOption::VALUE_REQUIRED, |
|
| 100 | + 'The date format used in the CSV file(s)' |
|
| 101 | + ) |
|
| 102 | + ->addOption( |
|
| 103 | + InputOptionKeys::DB_PDO_DSN, |
|
| 104 | + null, |
|
| 105 | + InputOption::VALUE_REQUIRED, |
|
| 106 | + 'The DSN used to connect to the Magento database where the data has to be imported, e. g. mysql:host=127.0.0.1;dbname=magento' |
|
| 107 | + ) |
|
| 108 | + ->addOption( |
|
| 109 | + InputOptionKeys::DB_USERNAME, |
|
| 110 | + null, |
|
| 111 | + InputOption::VALUE_REQUIRED, |
|
| 112 | + 'The username used to connect to the Magento database' |
|
| 113 | + ) |
|
| 114 | + ->addOption( |
|
| 115 | + InputOptionKeys::DB_PASSWORD, |
|
| 116 | + null, |
|
| 117 | + InputOption::VALUE_REQUIRED, |
|
| 118 | + 'The password used to connect to the Magento database' |
|
| 119 | + ); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |