/** * Load data fixtures with the passed EntityManager * * @param ObjectManager $manager */ public function load(ObjectManager $manager) { $county = new Country(); $county->setName('Ukraine'); $county->setIso2('ua'); $county->setPrefix('38'); $county->setPattern('^380[3-9]{1}[0-9]{8}$'); $county->setLength(12); $manager->persist($county); $manager->flush(); $this->addReference('country:ua', $county); }