1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-18 05:10:07 -07:00
PrintABrick/src/AppBundle/Command/LoadRelationCommand.php
David Hübner 649121f1dc Add RelationLoader service
Service for loading relation between rebrickable parts and ldraw models
2017-04-05 19:30:06 +02:00

28 lines
808 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 LoadRelationCommand extends ContainerAwareCommand
{
protected function configure()
{
$this
->setName('app:load:relations')
->setDescription('Loads relations between LDraw models and Rebrickable parts')
->setHelp('This command allows you to..');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$relationLoader = $this->getContainer()->get('service.loader.relation');
$relationLoader->setOutput($output);
//TODO log errors
$relationLoader->loadNotPaired();
}
}