Restructure hits for output and easier use
This commit is contained in:
parent
91e7c2bd06
commit
55c418aa2f
2 changed files with 804 additions and 1329 deletions
|
@ -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
|
||||||
|
|
2125
src/Models/Hit.php
2125
src/Models/Hit.php
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue