public function load(ObjectManager $manager) { $listNames = array('Rémi', 'Axel', 'Batman'); foreach ($listNames as $name) { $user = new User(); $user->setUsername($name); $user->setPassword($name); $manager->persist($user); } $manager->flush(); }
/** * {@inheritDoc} */ public function setPassword($password) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPassword', array($password)); return parent::setPassword($password); }