setName('app:load:ldraw') ->setDescription('Loads LDraw library parts') ->setHelp('This command allows you to..') ->addArgument('ldraw_path', InputArgument::OPTIONAL, 'Path to LDraw library folder'); } protected function execute(InputInterface $input, OutputInterface $output) { $ldrawLoader = $this->getContainer()->get('loader.ldraw'); $ldrawLoader->setOutput($output); //TODO log errors try { if (($ldrawPath = $input->getArgument('ldraw_path')) == null) { $ldrawPath = $ldrawLoader->downloadLibrary(); } $ldrawLoader->loadModels($ldrawPath); } catch (\Exception $e) { printf($e->getMessage()); } } }