示例#1
0
 /**
  * @param ServiceDeliveryInterface $a
  * @param ServiceDeliveryInterface $b
  *
  * @return int
  */
 public static function sort(ServiceDeliveryInterface $a, ServiceDeliveryInterface $b)
 {
     if ($a->getPriority() === $b->getPriority()) {
         return 0;
     }
     return $a->getPriority() > $b->getPriority() ? -1 : 1;
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function setDeliveryMethod(ServiceDeliveryInterface $method = null)
 {
     $this->deliveryMethod = $method;
     $this->deliveryMethodCode = $method ? $method->getCode() : null;
 }