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

38 lines
809 B
PHP

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