Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Result.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Shipping\Model\Rate\Result as RateResult;
10 
11 class Result
12 {
16  protected $_trackings = [];
17 
21  protected $_error = null;
22 
28  public function reset()
29  {
30  $this->_trackings = [];
31  return $this;
32  }
33 
38  public function setError($error)
39  {
40  $this->_error = $error;
41  }
42 
46  public function getError()
47  {
48  return $this->_error;
49  }
50 
57  public function append($result)
58  {
59  if ($result instanceof AbstractResult) {
60  $this->_trackings[] = $result;
61  } elseif ($result instanceof RateResult) {
62  $trackings = $result->getAllTrackings();
63  foreach ($trackings as $track) {
64  $this->append($track);
65  }
66  }
67  return $this;
68  }
69 
75  public function getAllTrackings()
76  {
77  return $this->_trackings;
78  }
79 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$track
Definition: details.phtml:12