Ejemplo n.º 1
0
 /**
  * Instantiates an order entity and sets its properties using db data.
  *
  * @param array $orderData
  *   The array of db data.
  *
  * @return \MusicBox\Entity\order
  */
 protected function buildorder($orderData)
 {
     $order = new order();
     $order->setId($orderData['order_id']);
     $order->setName($orderData['name']);
     $order->setShortBiography($orderData['short_biography']);
     $order->setBiography($orderData['biography']);
     $order->setSoundCloudUrl($orderData['soundcloud_url']);
     $order->setImage($orderData['image']);
     $order->setLikes($orderData['likes']);
     $createdAt = new \DateTime('@' . $orderData['created_at']);
     $order->setCreatedAt($createdAt);
     return $order;
 }