Skip to content

Instantly share code, notes, and snippets.

@ricfrank
Created February 28, 2015 18:15
Show Gist options
  • Save ricfrank/26246bd90baa99cad61a to your computer and use it in GitHub Desktop.
Save ricfrank/26246bd90baa99cad61a to your computer and use it in GitHub Desktop.
<?php
class OrderProcessedViewModel
{
public $orderId;
public $paymentDetails;
public $shippingDetails;
public static function createFromOrder(Order $order)
{
$orderProcessedViewModel = new OrderProcessedViewModel();
$orderProcessedViewModel->orderId = $order->getOrderId();
$orderProcessedViewModel->paymentDetails = new OrderPaymentConfirmation();
$orderProcessedViewModel->shippingDetails = new OrderShippingConfirmation();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment