/**
  * Transform a Location to LocationData
  *
  * @param LocationInterface $location Location
  *
  * @return LocationData
  */
 public function transform(LocationInterface $location)
 {
     return $this->locationDataFactory->create($location->getId(), $location->getName(), $location->getCode(), $location->getType());
 }
Esempio n. 2
0
 /**
  * Drops the country and its relations.
  *
  * @param LocationInterface $location The location to remove
  * @param OutputInterface   $output   A console output
  *
  * @return $this Self object
  */
 private function dropCountry(LocationInterface $location, OutputInterface $output)
 {
     $countryCode = $location->getCode();
     $this->startStopWatch('drop_location');
     $this->locationDirector->remove($location);
     $stopWatchEvent = $this->stopStopWatch('drop_location');
     $this->printMessage($output, 'Geo', 'Country ' . $countryCode . ' dropped in ' . $stopWatchEvent->getDuration() . ' milliseconds');
     return $this;
 }