public function _retrieveMethod($from, $to, $action)
{
switch ($action) {
case static::ACT_CONVERT_TO_OBJECT:
/* @var $from Entity\ScalingMetric */
if (!empty($from->retrieveMethod)) {
$to->retrieveMethod = $from->retrieveMethod;
}
break;
case static::ACT_CONVERT_TO_ENTITY:
/* @var $to Entity\ScalingMetric */
$to->retrieveMethod = $from->retrieveMethod;
break;
case static::ACT_GET_FILTER_CRITERIA:
return [['retrieveMethod' => $from->retrieveMethod]];
}
}