| @@ -38,7 +38,7 @@ class AuthenticationSuccessListener | |||||
| } | } | ||||
| $userApi = $this->microMapper->map($user, UserApi::class, [ | $userApi = $this->microMapper->map($user, UserApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $userIri = $this->iriConverter->getIriFromResource($userApi); | $userIri = $this->iriConverter->getIriFromResource($userApi); | ||||
| @@ -45,7 +45,7 @@ class LocationEntityToApiMapper implements MapperInterface | |||||
| $dto->createdAt = $entity->getCreatedAt(); | $dto->createdAt = $entity->getCreatedAt(); | ||||
| $dto->zoneIri = $dto->zone = $this->microMapper->map($entity->getZone(), ZoneApi::class, [ | $dto->zoneIri = $dto->zone = $this->microMapper->map($entity->getZone(), ZoneApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| return $dto; | return $dto; | ||||
| @@ -47,15 +47,15 @@ class TripEntityToApiMapper implements MapperInterface | |||||
| // Map related entities | // Map related entities | ||||
| $dto->vesselIri = $dto->vessel = $this->microMapper->map($entity->getVessel(), VesselApi::class, [ | $dto->vesselIri = $dto->vessel = $this->microMapper->map($entity->getVessel(), VesselApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->startLocationIri = $dto->startLocation = $this->microMapper->map($entity->getStartLocation(), LocationApi::class, [ | $dto->startLocationIri = $dto->startLocation = $this->microMapper->map($entity->getStartLocation(), LocationApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->endLocationIri = $dto->endLocation = $this->microMapper->map($entity->getEndLocation(), LocationApi::class, [ | $dto->endLocationIri = $dto->endLocation = $this->microMapper->map($entity->getEndLocation(), LocationApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| return $dto; | return $dto; | ||||
| @@ -42,11 +42,11 @@ class TripLocationEntityToApiMapper implements MapperInterface | |||||
| $dto->createdAt = $entity->getCreatedAt(); | $dto->createdAt = $entity->getCreatedAt(); | ||||
| $dto->trip = $this->microMapper->map($entity->getTrip(), TripApi::class, [ | $dto->trip = $this->microMapper->map($entity->getTrip(), TripApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ | $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| return $dto; | return $dto; | ||||
| @@ -50,7 +50,7 @@ class UserEntityToApiMapper implements MapperInterface | |||||
| $dto->imageIri = $dto->image = null; | $dto->imageIri = $dto->image = null; | ||||
| if ($entity->getImage() !== null) { | if ($entity->getImage() !== null) { | ||||
| $dto->imageIri = $dto->image = $this->microMapper->map($entity->getImage(), MediaObjectApi::class, [ | $dto->imageIri = $dto->image = $this->microMapper->map($entity->getImage(), MediaObjectApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| } | } | ||||
| @@ -47,17 +47,17 @@ class UserTripEntityToApiMapper implements MapperInterface | |||||
| $dto->createdAt = $entity->getCreatedAt(); | $dto->createdAt = $entity->getCreatedAt(); | ||||
| $dto->tripIri = $dto->trip = $this->microMapper->map($entity->getTrip(), TripApi::class, [ | $dto->tripIri = $dto->trip = $this->microMapper->map($entity->getTrip(), TripApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->userIri = $dto->user = $this->microMapper->map($entity->getUser(), UserApi::class, [ | $dto->userIri = $dto->user = $this->microMapper->map($entity->getUser(), UserApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->signatureIri = $dto->signature = null; | $dto->signatureIri = $dto->signature = null; | ||||
| if ($entity->getSignature() !== null) { | if ($entity->getSignature() !== null) { | ||||
| $dto->signatureIri = $dto->signature = $this->microMapper->map($entity->getSignature(), MediaObjectApi::class, [ | $dto->signatureIri = $dto->signature = $this->microMapper->map($entity->getSignature(), MediaObjectApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| } | } | ||||
| @@ -41,21 +41,21 @@ class UserTripEventApiToEntityMapper implements MapperInterface | |||||
| } | } | ||||
| $userTrip = $this->microMapper->map($dto->userTripIri, UserTrip::class, [ | $userTrip = $this->microMapper->map($dto->userTripIri, UserTrip::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| if (!$userTrip) { | if (!$userTrip) { | ||||
| throw new \Exception('UserTrip not found'); | throw new \Exception('UserTrip not found'); | ||||
| } | } | ||||
| $event = $this->microMapper->map($dto->eventIri, Event::class, [ | $event = $this->microMapper->map($dto->eventIri, Event::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| if (!$event) { | if (!$event) { | ||||
| throw new \Exception('Event not found'); | throw new \Exception('Event not found'); | ||||
| } | } | ||||
| $location = $this->microMapper->map($dto->locationIri, Location::class, [ | $location = $this->microMapper->map($dto->locationIri, Location::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| if (!$location) { | if (!$location) { | ||||
| throw new \Exception('Location not found'); | throw new \Exception('Location not found'); | ||||
| @@ -72,7 +72,7 @@ class UserTripEventApiToEntityMapper implements MapperInterface | |||||
| assert($entity instanceof UserTripEvent); | assert($entity instanceof UserTripEvent); | ||||
| $userTrip = $this->microMapper->map($dto->userTripIri, UserTrip::class, [ | $userTrip = $this->microMapper->map($dto->userTripIri, UserTrip::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| if (!$userTrip) { | if (!$userTrip) { | ||||
| throw new \Exception('UserTrip not found'); | throw new \Exception('UserTrip not found'); | ||||
| @@ -80,7 +80,7 @@ class UserTripEventApiToEntityMapper implements MapperInterface | |||||
| $entity->setUserTrip($userTrip); | $entity->setUserTrip($userTrip); | ||||
| $event = $this->microMapper->map($dto->eventIri, Event::class, [ | $event = $this->microMapper->map($dto->eventIri, Event::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| if (!$event) { | if (!$event) { | ||||
| throw new \Exception('Event not found'); | throw new \Exception('Event not found'); | ||||
| @@ -88,7 +88,7 @@ class UserTripEventApiToEntityMapper implements MapperInterface | |||||
| $entity->setEvent($event); | $entity->setEvent($event); | ||||
| $location = $this->microMapper->map($dto->locationIri, Location::class, [ | $location = $this->microMapper->map($dto->locationIri, Location::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| if (!$location) { | if (!$location) { | ||||
| throw new \Exception('Location not found'); | throw new \Exception('Location not found'); | ||||
| @@ -44,19 +44,19 @@ class UserTripEventEntityToApiMapper implements MapperInterface | |||||
| $dto->createdAt = $entity->getCreatedAt(); | $dto->createdAt = $entity->getCreatedAt(); | ||||
| $dto->userTripIri = $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ | $dto->userTripIri = $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->eventIri = $dto->event = $this->microMapper->map($entity->getEvent(), EventApi::class, [ | $dto->eventIri = $dto->event = $this->microMapper->map($entity->getEvent(), EventApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->locationIri = $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ | $dto->locationIri = $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->user = $this->microMapper->map($entity->getUserTrip()->getUser(), UserApi::class, [ | $dto->user = $this->microMapper->map($entity->getUserTrip()->getUser(), UserApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| return $dto; | return $dto; | ||||
| @@ -41,11 +41,11 @@ class UserTripLocationEntityToApiMapper implements MapperInterface | |||||
| $dto->createdAt = $entity->getCreatedAt(); | $dto->createdAt = $entity->getCreatedAt(); | ||||
| $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ | $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ | $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| return $dto; | return $dto; | ||||
| @@ -42,15 +42,15 @@ class UserTripWorkLogEntityToApiMapper implements MapperInterface | |||||
| $dto->createdAt = $entity->getCreatedAt(); | $dto->createdAt = $entity->getCreatedAt(); | ||||
| $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ | $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->startLocation = $this->microMapper->map($entity->getStartLocation(), LocationApi::class, [ | $dto->startLocation = $this->microMapper->map($entity->getStartLocation(), LocationApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| $dto->endLocation = $this->microMapper->map($entity->getEndLocation(), LocationApi::class, [ | $dto->endLocation = $this->microMapper->map($entity->getEndLocation(), LocationApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| return $dto; | return $dto; | ||||
| @@ -41,7 +41,7 @@ class VesselEntityToApiMapper implements MapperInterface | |||||
| $dto->createdAt = $entity->getCreatedAt(); | $dto->createdAt = $entity->getCreatedAt(); | ||||
| $dto->company = $this->microMapper->map($entity->getCompany(), ShippingCompanyApi::class, [ | $dto->company = $this->microMapper->map($entity->getCompany(), ShippingCompanyApi::class, [ | ||||
| MicroMapperInterface::MAX_DEPTH => 1, | |||||
| MicroMapperInterface::MAX_DEPTH => 3, | |||||
| ]); | ]); | ||||
| return $dto; | return $dto; | ||||