if (!
isset($val['path'
])) { continue;
} $val['path'
] =
$this->mediaService->
normalize($val['path'
]);
} unset($val);
} $value = Zend_Json::
encode($value);
} if (\
is_string($value) && \
in_array($xType,
$mediaFields, true
) &&
$this->mediaService->
isEncoded($value)) { $value =
$this->mediaService->
normalize($value);
} if (\
is_array($value)) { throw new UnexpectedValueException(sprintf('Use field value type "%s" if arrays should be saved. Got value type "%s" instead', Field::VALUE_TYPE_JSON,
$valueType));
} return $value;
} /**
* Fetch all emotions with same category ID and
* mark existing emotions with same devices and category
*/