_trackings = []; return $this; } /** * @param array $error * @return void */ public function setError($error) { $this->_error = $error; } /** * @return array|null */ public function getError() { return $this->_error; } /** * Add a tracking to the result * * @param AbstractResult|RateResult $result * @return $this */ public function append($result) { if ($result instanceof AbstractResult) { $this->_trackings[] = $result; } elseif ($result instanceof RateResult) { $trackings = $result->getAllTrackings(); foreach ($trackings as $track) { $this->append($track); } } return $this; } /** * Return all trackings in the result * * @return array */ public function getAllTrackings() { return $this->_trackings; } }