public static function createDetachedEntity(string $objectName, array $data)
    {
        $detachedEntity = new $objectName;

        self::updateEntityFromArray($detachedEntity, $data);

        return $detachedEntity;
    }
public static function createDetachedEntity(string $objectName, array $data)
    {
        $detachedEntity = new $objectName;

        self::updateEntityFromArray($detachedEntity, $data);

        return $detachedEntity;
    }
public static function createDetachedEntity ( string $ objectName , array $ data ) { $ detachedEntity = new $ objectName ; self :: updateEntityFromArray ( $ detachedEntity , $ data ) ; return $ detachedEntity ; }
Creates new entity based on object name sets object
parameter from data
@param string $objectName
@param array $data
@return mixed
Creates new entity based on object name sets object parameter from data