mirror of
https://github.com/openvk/openvk
synced 2025-04-23 08:33:02 +03:00
Create ProcessDDEXCommand.php
- Начало разработки DDEX процессора
This commit is contained in:
parent
8ba792d9b9
commit
ac335dc396
1 changed files with 43 additions and 0 deletions
43
CLI/ProcessDDEXCommand.php
Normal file
43
CLI/ProcessDDEXCommand.php
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<?php declare(strict_types=1);
|
||||||
|
namespace openvk\CLI;
|
||||||
|
use Chandler\Database\DatabaseConnection;
|
||||||
|
use openvk\Web\Models\Repositories\Photos;
|
||||||
|
use Symfony\Component\Console\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Nette\Utils\ImageException;
|
||||||
|
|
||||||
|
class ProcessDDEXCommand extends Command
|
||||||
|
{
|
||||||
|
private $images;
|
||||||
|
|
||||||
|
protected static $defaultName = "process-ddex";
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
$this->images = DatabaseConnection::i()->getContext()->table("photos");
|
||||||
|
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function configure(): void
|
||||||
|
{
|
||||||
|
$this->setDescription("Process DDEX ERN packages for music uploading")
|
||||||
|
->setHelp("This command allows you to process all DDEX ERN packages for music uploading");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||||
|
{
|
||||||
|
$header = $output->section();
|
||||||
|
$counter = $output->section();
|
||||||
|
|
||||||
|
$header->writeln([
|
||||||
|
"DDEX ERN processor utility",
|
||||||
|
"=====================",
|
||||||
|
"",
|
||||||
|
]);
|
||||||
|
|
||||||
|
return Command::SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue