Sonata\Component\Delivery\ServiceDeliveryInterface::getPriority PHP Method

getPriority() public method

public getPriority ( ) : integer
return integer
    public function getPriority();

Usage Example

示例#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;
 }