Sonata\Component\Order\OrderInterface::getId PHP Method

getId() public method

public getId ( ) : integer
return integer the order id
    public function getId();

Usage Example

示例#1
0
 /**
  * @param \Sonata\Component\Order\OrderInterface $order
  *
  * @throws \RuntimeException
  *
  * @return string
  */
 public function generateUrlCheck(OrderInterface $order)
 {
     if (!$order->getCreatedAt() instanceof \DateTime) {
         throw new \RuntimeException(sprintf('The order must have a creation date - id:%s, reference:%s ', $order->getId(), $order->getReference()));
     }
     return sha1($order->getReference() . $order->getCreatedAt()->format("m/d/Y:G:i:s") . $order->getId() . $this->getOption('shop_secret_key'));
 }
All Usage Examples Of Sonata\Component\Order\OrderInterface::getId