mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-17 21:00:09 -07:00
37 lines
994 B
PHP
37 lines
994 B
PHP
<?php
|
|
|
|
namespace AppBundle\Command;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
class LoadRebrickableCommand extends ContainerAwareCommand
|
|
{
|
|
protected function configure()
|
|
{
|
|
$this
|
|
->setName('app:load:rebrickable')
|
|
->setDescription('Loads Rebrickable csv data')
|
|
->setHelp('This command allows you to..')
|
|
;
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
$rebrickableLoader = $this->getContainer()->get('loader.rebrickable');
|
|
|
|
try {
|
|
$rebrickableLoader->loadColors();
|
|
|
|
$rebrickableLoader->loadParts($output);
|
|
|
|
$rebrickableLoader->loadBuildingKits($output);
|
|
|
|
$rebrickableLoader->loadPartBuildingKits($output);
|
|
} catch (\Exception $e) {
|
|
printf($e->getMessage());
|
|
}
|
|
}
|
|
}
|