protected function determineDetailOption() {
        if (!isset($this->options['IsPartnered']) || !isset($this->options['ShipmentType'])) {
            $this->log('Cannot set transport details without shipment type and partner parameters!', 'Warning');
            return false;
        }
        $op = 'TransportDetails.';
        if ($this->options['ShipmentType'] == 'SP') {
            if ($this->options['IsPartnered'] == 'true') {
                return $op . 'PartneredSmallParcelData';
            } else {
                return $op . 'NonPartneredSmallParcelData';
            }
        } else if ($this->options['ShipmentType'] == 'LTL') {
            if ($this->options['IsPartnered'] == 'true') {
                return $op . 'PartneredLtlData';
            } else {
                return $op . 'NonPartneredLtlData';
            }
        }
        $this->log('Unknown shipment type, cannot set transport details!', 'Warning');
        return false;
    }
protected function determineDetailOption() {
        if (!isset($this->options['IsPartnered']) || !isset($this->options['ShipmentType'])) {
            $this->log('Cannot set transport details without shipment type and partner parameters!', 'Warning');
            return false;
        }
        $op = 'TransportDetails.';
        if ($this->options['ShipmentType'] == 'SP') {
            if ($this->options['IsPartnered'] == 'true') {
                return $op . 'PartneredSmallParcelData';
            } else {
                return $op . 'NonPartneredSmallParcelData';
            }
        } else if ($this->options['ShipmentType'] == 'LTL') {
            if ($this->options['IsPartnered'] == 'true') {
                return $op . 'PartneredLtlData';
            } else {
                return $op . 'NonPartneredLtlData';
            }
        }
        $this->log('Unknown shipment type, cannot set transport details!', 'Warning');
        return false;
    }
protected function determineDetailOption ( ) { if ( ! isset ( $ this -> options [ 'IsPartnered' ] ) || ! isset ( $ this -> options [ 'ShipmentType' ] ) ) { $ this -> log ( 'Cannot set transport details without shipment type and partner parameters!' , 'Warning' ) ; return false ; } $ op = 'TransportDetails.' ; if ( $ this -> options [ 'ShipmentType' ] == 'SP' ) { if ( $ this -> options [ 'IsPartnered' ] == 'true' ) { return $ op . 'PartneredSmallParcelData' ; } else { return $ op . 'NonPartneredSmallParcelData' ; } } else if ( $ this -> options [ 'ShipmentType' ] == 'LTL' ) { if ( $ this -> options [ 'IsPartnered' ] == 'true' ) { return $ op . 'PartneredLtlData' ; } else { return $ op . 'NonPartneredLtlData' ; } } $ this -> log ( 'Unknown shipment type, cannot set transport details!' , 'Warning' ) ; return false ; }
Determines which of the four possible transport detail parameter prefixes should be used.
The parameter to use depends on the partnered and shipment type parameters.
@return string|boolean parameter prefix or <b>FALSE</b> if it could not be determined
Determines which of the four possible transport detail parameter prefixes should be used . The parameter to use depends on the partnered and shipment type parameters .