public function endItemsOnEbay($id) { $sm = new ListingsModel(); if (is_array($id)) { foreach ($id as $single_id) { $this->lastResults[] = $sm->endItem($single_id, $this->session); } $this->processLastResults(); } else { $this->lastResults[] = $sm->endItem($id, $this->session); $this->processLastResults(); return $this->lastResults; } }