добавил несколько парсеров

This commit is contained in:
2024-11-04 20:12:41 +03:00
parent 5344b31f97
commit 1117bd5ddc
2022 changed files with 2235 additions and 190924 deletions

36
tests/test.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
use SvedenParser\Color;
use SvedenParser\ContingentParser\ContingentRepository;
use SvedenParser\ContingentParser\ContingentService;
use SvedenParser\Http\HttpClient;
use SvedenParser\Printer;
use Symfony\Component\Console\Output\ConsoleOutput;
define('SVEDEN_PARSER', '/home/developer/sveden_parser');
require_once SVEDEN_PARSER . "/vendor/autoload.php";
use Symfony\Component\Console\Helper\ProgressBar;
$output = new ConsoleOutput();
// creates a new progress bar (50 units)
$progressBar = new ProgressBar($output, 50);
// starts and displays the progress bar
$progressBar->start();
$i = 0;
while ($i++ < 50) {
// ... do some wor
sleep(1);
echo "\r$i \n";
// advances the progress bar 1 unit
$progressBar->advance();
// you can also advance the progress bar by more than 1 unit
// $progressBar->advance(3);
}
// ensures that the progress bar is at 100%
$progressBar->finish();
echo PHP_EOL;