protected function parseCompany($record) { $idno = $record[0]; $title = $record[2]; $address = $record[4]; $director = $record[5]; $company = new Company(); $company->setIdno($idno); $company->setTitle($title); $company->setAddress($address); $company->setDirector($director); $this->em->persist($company); }