示例#1
0
 public function save(array $data)
 {
     $patient = new Patient();
     $patient->setLastname($data['lastname']);
     $patient->setFirstname($data['firstname']);
     $patient->setGender($data['gender']);
     $patient->setBirthYear($data['birthyear']);
     $patient->setAddress($data['address']);
     $patient->setPhone($data['phone']);
     $this->em->persist($patient);
     $this->em->flush();
     return $patient->getId();
 }
 /**
  * {@inheritDoc}
  */
 public function getId()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());
     return parent::getId();
 }