exchangeArray() public method

public exchangeArray ( array $data )
$data array
 /**
  * Create a new Doctrine REST service
  *
  * @param array|object $data
  * @return DoctrineRestServiceEntity|ApiProblem
  */
 public function create($data)
 {
     if (is_object($data)) {
         $data = (array) $data;
     }
     $type = DoctrineRestServiceModelFactory::TYPE_DEFAULT;
     $creationData = new NewDoctrineServiceEntity();
     $creationData->exchangeArray($data);
     $model = $this->getModel($type);
     try {
         $service = $model->createService($creationData);
     } catch (\Exception $e) {
         return new ApiProblem(409, sprintf('Unable to create Doctrine REST service: %s', $e->getMessage()));
     }
     return $service;
 }
 /**
  * Create a new REST service
  *
  * @param  array|object $data
  * @return DoctrineRestServiceEntity
  * @throws CreationException
  */
 public function create($data)
 {
     if (is_object($data)) {
         // @codeCoverageIgnoreStart
         $data = (array) $data;
     }
     // @codeCoverageIgnoreEnd
     $type = DoctrineRestServiceModelFactory::TYPE_DEFAULT;
     $creationData = new NewDoctrineServiceEntity();
     $creationData->exchangeArray($data);
     $model = $this->getModel($type);
     try {
         $service = $model->createService($creationData);
     } catch (\Exception $e) {
         // @codeCoverageIgnoreStart
         throw new CreationException('Unable to create REST service', $e->getCode(), $e);
         // @codeCoverageIgnoreEnd
     }
     return $service;
 }