예제 #1
0
 /**
  * @param ApiTransmitter $apiTransmitter
  * @param OrderMetadata $orderMetadata
  * @param OrderMapper $orderMapper
  * @param $orderClass
  */
 public function __construct(ApiTransmitter $apiTransmitter, OrderMetadata $orderMetadata, OrderMapper $orderMapper, $orderClass)
 {
     parent::__construct($apiTransmitter);
     $this->orderMapper = $orderMapper;
     $this->orderMetadata = $orderMetadata;
     if (!class_exists($orderClass)) {
         throw new \InvalidArgumentException('Order class not exists');
     }
     if (!in_array('ExpressRuSDK\\Model\\Entities\\Order\\ExpressRuOrderInterface', class_implements($orderClass))) {
         throw new \InvalidArgumentException('Order class must implements ExpressRuSDK\\Model\\Entities\\Order\\ExpressRuOrderInterface');
     }
     $this->orderClass = $orderClass;
 }
 /**
  * @param ApiTransmitter $apiTransmitter
  * @param TrackingStatusMetadata $trackingStatusMetadata
  * @param TrackingStatusMapper $trackingStatusMapper
  */
 public function __construct(ApiTransmitter $apiTransmitter, TrackingStatusMetadata $trackingStatusMetadata, TrackingStatusMapper $trackingStatusMapper)
 {
     parent::__construct($apiTransmitter);
     $this->trackingStatusMapper = $trackingStatusMapper;
     $this->trackingStatusMetadata = $trackingStatusMetadata;
 }