/** * @param SS_HTTPRequest $request */ public function run($request) { foreach (HailApiObject::fetchables() as $hailObjType) { echo "Fetching {$hailObjType}"; $hailApiObject = singleton($hailObjType); $hailApiObject->fetch(); } }
public function process() { $times = $this->times; // needed due to quirks with __set $times[] = date('Y-m-d H:i:s'); $this->times = $times; $hailObjTypes = HailApiObject::fetchables(); $hailObjType = $hailObjTypes[$this->currentStep]; $this->addMessage("Fetching {$hailObjType}"); $hailApiObject = singleton($hailObjType); $hailApiObject->fetch(); $this->currentStep++; if ($this->currentStep >= $this->totalSteps) { $this->isComplete = true; } }