1 | <?php |
||
18 | class XmlDumpImportCommand extends ImportCommandBase { |
||
19 | |||
20 | 2 | protected function configure() { |
|
37 | |||
38 | protected function executeCommand( InputInterface $input, OutputInterface $output ) { |
||
39 | 2 | $onAborted = function( $pageTitle ) use ( $output ) { |
|
40 | $output->writeln( "\n" ); |
||
41 | $output->writeln( "<info>Import process aborted</info>" ); |
||
42 | $output->writeln( "<comment>To resume, run with</comment> --continue=$pageTitle" ); |
||
43 | 2 | }; |
|
44 | |||
45 | 2 | $importer = new PagesImporterCli( $input, $output, $this->factory, $onAborted ); |
|
|
|||
46 | |||
47 | 2 | $entityPageIterator = new DumpEntityPageIterator( $this->getDumpIterator( $input, $output ) ); |
|
48 | 2 | $importer->runImport( $entityPageIterator ); |
|
49 | 2 | } |
|
50 | |||
51 | 2 | private function getDumpIterator( InputInterface $input, OutputInterface $output ) { |
|
58 | |||
59 | 2 | private function handleContinueArgument( InputInterface $input, OutputInterface $output, DumpReader $reader ) { |
|
68 | |||
69 | 2 | private function newDumpReader( $file ) { |
|
73 | |||
74 | } |
||
75 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: