CBPHelper :: ConvertParameterValues: Bitrix method

      
<?php 
//  CBPHelper :: ConvertParameterValues()
//  /dist/bitrix/modules/bizproc/classes/general/helper.php:2162

    
public static function ConvertParameterValues($val)
    {
        
$result $val;

        if (
is_string($val) && preg_match(CBPActivity::ValuePattern$val$arMatches))
        {
            
$result null;
            if (
$arMatches['object'] == "User")
            {
                if (
$GLOBALS["USER"]->IsAuthorized())
                    
$result "user_".$GLOBALS["USER"]->GetID();
            }
            elseif (
$arMatches['object'] == "System")
            {
                if (
strtolower($arMatches['field']) === "now")
                    
$result date($GLOBALS["DB"]->DateFormatToPHP(CSite::GetDateFormat("FULL")));
                elseif (
strtolower($arMatches['field']) == "date")
                    
$result date($GLOBALS["DB"]->DateFormatToPHP(CSite::GetDateFormat("SHORT")));
            }
        }

        return 
$result;
    }