Example #1
0
 private function loadBaseCustomers()
 {
     foreach (self::$customersArray as $customerArray) {
         $customer = new Customer();
         $customer->setFirstName($customerArray['first']);
         $customer->setLastName($customerArray['last']);
         $customer->setEmailAddress($customerArray['email']);
         $customer->setStreet($customerArray['street']);
         $customer->setCity($customerArray['city']);
         $customer->setState($customerArray['state']);
         $customer->setCountry($customerArray['country']);
         $customer->setZip($customerArray['zip']);
         $this->em->persist($customer);
     }
     $this->em->flush();
 }
Example #2
0
 public function __toString()
 {
     return $this->getId() . ' - ' . $this->customer->getLastName();
 }