src/Transformer/Transformer.php
public function transform($returnClass, $config, $values, $local_config = null, $result_type = 'object')
  {
    $value = $this->setLocalConfig($local_config)->process($returnClass, $config, $values);

    $value = $this->converter->convertTo($value, $result_type);

    return $value;
  }
public function transform($returnClass, $config, $values, $local_config = null, $result_type = 'object')
  {
    $value = $this->setLocalConfig($local_config)->process($returnClass, $config, $values);

    $value = $this->converter->convertTo($value, $result_type);

    return $value;
  }
public function transform ( $ returnClass , $ config , $ values , $ local_config = null , $ result_type = 'object' ) { $ value = $ this -> setLocalConfig ( $ local_config ) -> process ( $ returnClass , $ config , $ values ) ; $ value = $ this -> converter -> convertTo ( $ value , $ result_type ) ; return $ value ; }
This method transforms an array, an object or a json into the needed format.
It will validate the structure and the values with reference to a given configuration array.

@param object|string            $returnClass
@param array|object|string      $config
@param array|object|string      $values
@param null|array|string|object $local_config
@param string                   $result_type

@return array|object|string
@throws \Enm\Transformer\Exceptions\TransformerException
This method transforms an array an object or a json into the needed format . It will validate the structure and the values with reference to a given configuration array .