CAdvBanner :: GetKeywords: Bitrix method

      
<?php 
//  CAdvBanner :: GetKeywords()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:2951

    
public static function GetKeywords($TYPE_SID=""$LOGIC=""$EXACT_MATCH="")
    {
        global 
$arrADV_KEYWORDS$APPLICATION;
        
$arrReturn $arrADV_KEYWORDS;

        if(
            !
is_array($arrADV_KEYWORDS)
            || (
                !
array_key_exists(""$arrADV_KEYWORDS)
                && !
array_key_exists($TYPE_SID$arrADV_KEYWORDS)
            )
        )
        {
            
$keywords $APPLICATION->GetProperty("adv_desired_target_keywords");
            if(
$keywords === false)
                
$keywords $APPLICATION->GetProperty("keywords");
            
$arrWords explode(","$keywords);

            
$arrKeywords = array();
            foreach(
$arrWords as $word)
            {
                
$word trim($word);
                if(
strlen($word) > 0)
                    
$arrKeywords[] = $word;
            }

            if(
count($arrKeywords) > 0)
                
$arrReturn[$TYPE_SID]["DESIRED"]["N"] = $arrKeywords;
        }

        if(
strlen($TYPE_SID) > 0)
        {
            if(
strlen($LOGIC) > 0)
            {
                if(
strlen($EXACT_MATCH) > 0)
                    return 
$arrReturn[$TYPE_SID][$LOGIC][$EXACT_MATCH];
                else
                    return 
$arrReturn[$TYPE_SID][$LOGIC];
            }
            else
            {
                return 
$arrReturn[$TYPE_SID];
            }
        }
        else
        {
            return 
$arrReturn;
        }
    }