+ $em = $this->getDoctrine()->getManager();
+ $person = $em->getRepository('App:Person')->findOneBy(['email' => $request->get('email')]);
+
+ if (empty($person)) {
+ return $this->PersonNotFound();
+ }
+
+ return $person->getFriends();
+ }
+
+ private function PersonNotFound() {
+ return View::create(['message' => 'Person not found'], Response::HTTP_NOT_FOUND);
+ }
+
+ private function PersonsNotFound() {
+ return View::create(['message' => 'Persons not found'], Response::HTTP_NOT_FOUND);
+ }
+
+ private function PersonLocalisationNotFound() {
+ return View::create(['message' => 'Person localisation not found'], Response::HTTP_NOT_FOUND);