MagpieFromSimplePie::normalize_category PHP Method

normalize_category() public method

..
public normalize_category ( &$source, string $from, &$dest, string $to, integer $i )
$from string
$to string
$i integer
    function normalize_category(&$source, $from, &$dest, $to, $i)
    {
        $cat_id = $this->element_id($from, $i);
        $dc_id = $this->element_id($to, $i);
        // first normalize category elements: Atom 1.0 <=> RSS 2.0
        if (isset($source["{$cat_id}@term"])) {
            // category identifier
            $source[$cat_id] = $source["{$cat_id}@term"];
        } elseif ($this->is_rss()) {
            $source["{$cat_id}@term"] = $source[$cat_id];
        }
        if (isset($source["{$cat_id}@scheme"])) {
            // URI to taxonomy
            $source["{$cat_id}@domain"] = $source["{$cat_id}@scheme"];
        } elseif (isset($source["{$cat_id}@domain"])) {
            $source["{$cat_id}@scheme"] = $source["{$cat_id}@domain"];
        }
        // Now put the identifier into dc:subject
        $dest[$dc_id] = $source[$cat_id];
    }