src/TwitterCard/Config.php
public function getTags($useDefault = null)
    {
        if (is_null($useDefault)) {
            $useDefault = $this->useDefault;
        }
        $tags = array();
        foreach ($this->tags as $tag) {
            if (!array_key_exists($tag->getProperty(), $tags)) {
                $tags[$tag->getProperty()] = $tag->getValue();
            }
        }
        if ($useDefault) {
            foreach ($this->defaultTags as $tag) {
                if (!array_key_exists($tag->getProperty(), $tags)) {
                    $tags[$tag->getProperty()] = $tag->getValue();
                }
            }
        }
        return $tags;
    }
public function getTags($useDefault = null)
    {
        if (is_null($useDefault)) {
            $useDefault = $this->useDefault;
        }
        $tags = array();
        foreach ($this->tags as $tag) {
            if (!array_key_exists($tag->getProperty(), $tags)) {
                $tags[$tag->getProperty()] = $tag->getValue();
            }
        }
        if ($useDefault) {
            foreach ($this->defaultTags as $tag) {
                if (!array_key_exists($tag->getProperty(), $tags)) {
                    $tags[$tag->getProperty()] = $tag->getValue();
                }
            }
        }
        return $tags;
    }
public function getTags ( $ useDefault = null ) { if ( is_null ( $ useDefault ) ) { $ useDefault = $ this -> useDefault ; } $ tags = array ( ) ; foreach ( $ this -> tags as $ tag ) { if ( ! array_key_exists ( $ tag -> getProperty ( ) , $ tags ) ) { $ tags [ $ tag -> getProperty ( ) ] = $ tag -> getValue ( ) ; } } if ( $ useDefault ) { foreach ( $ this -> defaultTags as $ tag ) { if ( ! array_key_exists ( $ tag -> getProperty ( ) , $ tags ) ) { $ tags [ $ tag -> getProperty ( ) ] = $ tag -> getValue ( ) ; } } } return $ tags ; }
return the tags merged with the defaults
@return array
return the tags merged with the defaults