You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
780 B
34 lines
780 B
<?php
|
|
namespace app\common\shipping;
|
|
|
|
use app\common\shipping\ShippingFactory;
|
|
|
|
class ShippingStrategy
|
|
{
|
|
private $shippingGateway;
|
|
|
|
public function __construct($shipping_code){
|
|
$this->shippingGateway = ShippingFactory::createShippingService($shipping_code);
|
|
}
|
|
|
|
public function request($data){
|
|
return $this->shippingGateway->request($data);
|
|
}
|
|
|
|
public function response($data){
|
|
return $this->shippingGateway->response($data);
|
|
}
|
|
|
|
public function map($data){
|
|
return $this->shippingGateway->map($data);
|
|
}
|
|
|
|
public function mapResponse($data){
|
|
return $this->shippingGateway->mapResponse($data);
|
|
}
|
|
|
|
public function printLabel($data){
|
|
return $this->shippingGateway->printLabel($data);
|
|
}
|
|
|
|
} |