protected function resolvePath($path)
{
/** @var BaseActiveRecord $model */
$model = $this->owner;
return preg_replace_callback('/{([^}]+)}/', function ($matches) use($model) {
$name = $matches[1];
$attribute = ArrayHelper::getValue($model, $name);
if (is_string($attribute) || is_numeric($attribute)) {
return $attribute;
} else {
return $matches[0];
}
}, $path);
}