public function import($filePath) { $extractPath = \
dirname($filePath) . '/' .
pathinfo($filePath, PATHINFO_FILENAME
);
$emotionData =
$this->
extractEmotionArchive($filePath,
$extractPath);
if (!
$emotionData['presetData'
]) { throw new EmotionImportException('No emotion data available'
);
} if ($emotionData['requiredPlugins'
]) { $this->
checkRequiredPlugins($emotionData['requiredPlugins'
]);
} $presetData =
json_decode($emotionData['presetData'
], true
);
$syncData =
new ParameterBag($presetData['syncData'
]);
$this->
setFilePaths($syncData,
$extractPath);
$presetData['syncData'
] =
$syncData->
all();
$presetData =
json_encode($presetData);