Includes the fix for the GR/EL VAT prefix bug that broke exemption for every Greek VAT number (in_array-on-values vs array_key_exists in CacheTaxManager/VatNumber, plus the missing use import in EuValidatorAdapter). Adds IMPROVEMENTS.txt with a checklist of features adopted from comparing against the vatchecker module (offline-fallback policy, failure logging, company-name check, configurable EU country list, per-product exclusion, GB/XI mapping, AJAX live validation, address-priority strategy). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
88 lines
1.8 KiB
PHP
88 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Websmid\VatCheck\Console;
|
|
|
|
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
class WebOutput implements OutputInterface
|
|
{
|
|
public $cleaned = false;
|
|
|
|
public function __construct()
|
|
{
|
|
ini_set('output_buffering', 'Off');
|
|
}
|
|
|
|
public function write($messages, $newline = false, $options = 0)
|
|
{
|
|
if (!$this->cleaned) {
|
|
//ob_end_flush();
|
|
$this->cleaned = true;
|
|
}
|
|
echo $messages . '<br/>';
|
|
$this->flush_buffers();
|
|
}
|
|
|
|
public function flush_buffers()
|
|
{
|
|
//$result = ob_get_contents();
|
|
//echo $result;
|
|
flush();
|
|
}
|
|
|
|
public function writeln($messages, $options = 0)
|
|
{
|
|
// TODO: Implement writeln() method.
|
|
}
|
|
|
|
public function setVerbosity($level)
|
|
{
|
|
// TODO: Implement setVerbosity() method.
|
|
}
|
|
|
|
public function getVerbosity()
|
|
{
|
|
// TODO: Implement getVerbosity() method.
|
|
}
|
|
|
|
public function isQuiet()
|
|
{
|
|
// TODO: Implement isQuiet() method.
|
|
}
|
|
|
|
public function isVerbose()
|
|
{
|
|
// TODO: Implement isVerbose() method.
|
|
}
|
|
|
|
public function isVeryVerbose()
|
|
{
|
|
// TODO: Implement isVeryVerbose() method.
|
|
}
|
|
|
|
public function isDebug()
|
|
{
|
|
// TODO: Implement isDebug() method.
|
|
}
|
|
|
|
public function setDecorated($decorated)
|
|
{
|
|
// TODO: Implement setDecorated() method.
|
|
}
|
|
|
|
public function isDecorated()
|
|
{
|
|
// TODO: Implement isDecorated() method.
|
|
}
|
|
|
|
public function setFormatter(OutputFormatterInterface $formatter)
|
|
{
|
|
// TODO: Implement setFormatter() method.
|
|
}
|
|
|
|
public function getFormatter()
|
|
{
|
|
// TODO: Implement getFormatter() method.
|
|
}
|
|
} |