Files
grzanieplus.pl/plugins/stSoteshopXmlPlugin/lib/stSoteshopXmlTask.class.php
2025-03-12 17:06:23 +01:00

37 lines
835 B
PHP

<?php
class stSoteshopXmlTask extends stTask
{
protected $soteshopXml;
public function initialize()
{
$this->soteshopXml = new stSoteshopXml();
$this->soteshopXml->setCLI($this->isCLI());
}
/**
* W tej metodzie zwracamy ile rekordów/danych zamierzamy wykonać
*/
public function count(): int
{
return $this->soteshopXml->getStepsCount();
}
public function started() {
$this->soteshopXml->init();
}
public function finished() {
$this->soteshopXml->close();
}
/**
* W tej metodzie wykonujemy swoje operacje na danych
*
*/
public function execute(int $offset): int
{
return $this->soteshopXml->generate($offset);
}
}