offsetSet() public method

offsetSet for ArrayAccess
public offsetSet ( string $offset, mixed $value )
$offset string
$value mixed
 /**
  * offsetSet for ArrayAccess/Backwards compatibility.
  * @deprecated Add deprecation notices in future release.
  * @param string $offset
  * @param mixed $value
  */
 public function offsetSet($offset, $value)
 {
     if ('cost' === $offset) {
         $offset = 'total';
     }
     parent::offsetSet($offset, $value);
 }
 /**
  * offsetSet for ArrayAccess/Backwards compatibility.
  * @deprecated Add deprecation notices in future release.
  * @param string $offset
  * @param mixed $value
  */
 public function offsetSet($offset, $value)
 {
     if ('discount_amount' === $offset) {
         $offset = 'discount';
     } elseif ('discount_amount_tax' === $offset) {
         $offset = 'discount_tax';
     }
     parent::offsetSet($offset, $value);
 }
 /**
  * offsetSet for ArrayAccess/Backwards compatibility.
  * @deprecated Add deprecation notices in future release.
  * @param string $offset
  * @param mixed $value
  */
 public function offsetSet($offset, $value)
 {
     if ('line_total' === $offset) {
         $offset = 'total';
     } elseif ('line_tax' === $offset) {
         $offset = 'total_tax';
     } elseif ('line_tax_data' === $offset) {
         $offset = 'taxes';
     }
     parent::offsetSet($offset, $value);
 }