public function load(ObjectManager $manager)
 {
     $customer = new Customer();
     $customer->setCustomernumber(12975);
     $customer->setAccountname('Church On Wheels');
     $customer->setDeleted(0);
     $manager->persist($customer);
     $customer = new Customer();
     $customer->setCustomernumber(10719);
     $customer->setAccountname('Tidmore Flags');
     $customer->setDeleted(0);
     $manager->persist($customer);
     $customer = new Customer();
     $customer->setCustomernumber(12758);
     $customer->setAccountname('Americanflagstore.com INC');
     $customer->setDeleted(0);
     $manager->persist($customer);
     $customer = new Customer();
     $customer->setCustomernumber(13276);
     $customer->setAccountname('Flutter Flag Source');
     $customer->setDeleted(0);
     $manager->persist($customer);
     $customer = new Customer();
     $customer->setCustomernumber(13884);
     $customer->setAccountname('Carrot-Top Industries, Inc.');
     $customer->setDeleted(0);
     $manager->persist($customer);
     $customer = new Customer();
     $customer->setCustomernumber(11157);
     $customer->setAccountname('Oates Flag Co. Inc.');
     $customer->setDeleted(0);
     $manager->persist($customer);
     $customer = new Customer();
     $customer->setCustomernumber(14584);
     $customer->setAccountname('US Flag Supply');
     $customer->setDeleted(0);
     $manager->persist($customer);
     $manager->flush();
 }
 /**
  * Import customer records
  *
  * This function will import customer records from the array passed as a
  * paramter, and return the count of records created/updated
  *
  * @param type $aryImport
  * @return type
  */
 private function _importCustomers($aryImport)
 {
     $numRecs = count($aryImport);
     $aryProcessed = array();
     $newCust = 0;
     $updateCust = 0;
     for ($i = 0; $i < $numRecs; $i++) {
         $customerNum = $aryImport[$i]['customernumber'];
         if (in_array($customerNum, $aryProcessed)) {
             continue;
         }
         $aryProcessed[] = $customerNum;
         $customer = $this->getRepo('Customer')->findByCustomerNum($customerNum);
         if (!$customer) {
             //This is a new customer record
             $newCust++;
             $customer = new Customer();
             $customer->setDeleted(0);
             $customer->setCustomernumber($customerNum);
             $customer->setAccountname($aryImport[$i]['accountname']);
             $customer->setDatecreated(new \DateTime());
             $this->persistEntity($customer);
         } else {
             //This is an existing customer record
             //@TODO Do something with updated customer records
         }
     }
     $this->flushEntities();
     $data = array('customerNew' => $newCust, 'customerUpdate' => $updateCust);
     $result = array('status' => true, 'data' => $data);
     return $result;
 }