Restructure hits for output and easier use

This commit is contained in:
Ruben 2016-09-04 13:32:49 +01:00
parent 91e7c2bd06
commit 55c418aa2f
2 changed files with 804 additions and 1329 deletions

View File

@ -95,16 +95,16 @@ class ScoreControllerProvider implements ControllerProviderInterface
// attributes // attributes
$hit->setGlasses($data_hit['glasses']); $hit->setGlasses($data_hit['glasses']);
foreach(Models\Hit::$ATTRIBUTES as $attribute) { foreach(Models\Hit::$ATTRIBUTES as $attribute) {
$hit->setAttribute($attribute, $data_hit[$attribute]); $hit->getAttributes()->setAttribute($attribute, $data_hit[$attribute]);
} }
// emotions // emotions
foreach(Models\Hit::$EMOTIONS as $emotion) { foreach(Models\Hit::$EMOTIONS as $emotion) {
$hit->setEmotion($emotion, $data_hit['emotions'][$emotion]); $hit->getEmotions()->setEmotion($emotion, $data_hit['emotions'][$emotion]);
} }
//expressions //expressions
foreach(Models\Hit::$EXPRESSIONS as $expression) { foreach(Models\Hit::$EXPRESSIONS as $expression) {
$hit->setExpression($expression, $data_hit['expressions'][$expression]); $hit->getExpressions()->setExpression($expression, $data_hit['expressions'][$expression]);
} }
//points //points

File diff suppressed because it is too large Load Diff