Returns the values of the specified class tag

@param string $className Name of the class containing the property
@param string $tag Tag to return the values of
@return array An array of values or an empty array if the tag was not found
541687
public function getClassTagValues($className, $tag)
    {
        if (!isset($this->reflectedClassNames[$className])) {
            $this->reflectClass($className);
        }
        if (!isset($this->classTagsValues[$className])) {
            return [];
        }
        return isset($this->classTagsValues[$className][$tag]) ? $this->classTagsValues[$className][$tag] : [];
    }
409562
public function getByTag(string $tag): array
    {
        $result = [];
        if (isset($this->tags[$tag])) {
            foreach ($this->tags[$tag] as $id) {
                $result[$id] = $this->get($id);
            }
        }

        return $result;
    }
45810
public function getPostsByTag($tag)
    {
        if (false === array_key_exists($tag, $this->tagsIndex)) {
            return [];
        }

        $postNames = $this->tagsIndex[$tag];

        return $this->getPostsByName($postNames);
    }
272775
def getElementsByClassName(self, className):
        '''
            
        '''
        elements = []
        for child in self.children:
            if child.hasClass(className) is True:
                elements.append(child)
            elements += child.getElementsByClassName(className)
        return TagCollection(elements)
803281
@SuppressWarnings("unchecked")
  public <T extends Tag> T getTag(Class<T> tagClass) {
    List<T> matches = getTags(tagClass);
    T matchingTag = null;
    if (matches.size() > 0) {
      matchingTag = matches.get(0);
    }
//    if (matches.size() >= 2) {
//      throw new IllegalStateException("Multiple identical tags found (" + matches + ")");
//    }
//    else if (matches.size() == 1) {
//      matchingTag = matches.get(0);
//    }
    return matchingTag;
  }
1062
public function tagsByName($name)
    {
        $tags = array();
        foreach ($this->tags() as $tag) {
            if ($name === $tag->name()) {
                $tags[] = $tag;
            }
        }

        return $tags;
    }
1071697
public function fetchValues($tag, $attribute)
    {
        $values = array();

        // loop through each tag in the dom and add it to the array
        foreach ($this->getElementsByTagName($tag) as $element) {
            /* @var $element \DOMElement */
            $values[] = $element->getAttribute($attribute);
        }

        return $values;
    }
96139
public function getClassInherits(string $className): array
    {
        $buffer = [];

        foreach ($this->astParser->findInheritanceByClassname($className) as $dep) {
            $buffer[] = $dep;

            foreach ($this->resolveDepsRecursive($dep) as $recDep) {
                $buffer[] = $recDep;
            }
        }

        return $buffer;
    }
60839
private function retrieve_tag($tag)
    {
        if (isset($this->tags[$tag . 'count'])) { //if the openener is not in the Object we ignore it
            $temp_parent = $this->tags['parent']; //check to see if it's a closable tag.
            while ($temp_parent) { //till we reach '' (the initial value);
                if ($tag . $this->tags[$tag . 'count'] === $temp_parent) { //if this is it use it
                    break;
                }
                $temp_parent = isset($this->tags[$temp_parent . 'parent']) ? $this->tags[$temp_parent . 'parent'] : ''; //otherwise keep on climbing up the DOM Tree
            }
            if ($temp_parent) { //if we caught something
                $this->indent_level = $this->tags[$tag . $this->tags[$tag . 'count']]; //set the indent_level accordingly
                $this->tags['parent'] = $this->tags[$temp_parent . 'parent']; //and set the current parent
            }
            unset($this->tags[$tag . $this->tags[$tag . 'count'] . 'parent']); //delete the closed tags parent reference...
            unset($this->tags[$tag . $this->tags[$tag . 'count']]); //...and the tag itself
            if ($this->tags[$tag . 'count'] === 1) {
                unset($this->tags[$tag . 'count']);
            } else {
                $this->tags[$tag . 'count']--;
            }
        }
    }
1200453
public function getProperties($className)
    {
        if (isset($this->properties[$className])) {
            return $this->properties[$className];
        }

        return $this->properties[$className] = call_user_func_array(
            'array_merge',
            // first merge because `array_merge` expects >= 1 params
            array_merge(
                [[]],
                array_map(
                    [$this, 'getClassProperties'],
                    $this->getHierarchyClasses($className)
                )
            )
        );
    }
1233444
private function getTagIdByName( $tag )
    {
        $tagSql = $this->sql( $this->getTableInSchema( static::$tagTableName ) );

        $select = $tagSql->select()
                         ->columns( array( 'id' ) )
                         ->where( array(
                             new TypedParameters(
                                 'LOWER(?) = ?',
                                 array(
                                     'name',
                                     mb_strtolower( $tag, 'UTF-8' ),
                                 ),
                                 array(
                                     TypedParameters::TYPE_IDENTIFIER,
                                     TypedParameters::TYPE_VALUE,
                                 )
                             ),
                         ) );

        $result = $tagSql->prepareStatementForSqlObject( $select )
                         ->execute();

        foreach ( $result as $row )
        {
           return $row['id'];
        }

        return null;
    }
52393
public static function getCustomAttribute( $tag, $attributeName )
    {
        foreach ( $tag->attributes as $attribute )
        {
            if ( $attribute->name === $attributeName
              && $attribute->namespaceURI === 'http://ez.no/namespaces/ezpublish3/custom/' )
            {
                return $attribute->value;
            }
        }
        return null;
    }
95298
public function getFieldListByTag($tag)
    {
        $matchingFieldList = array();
        foreach ($this->fieldList as $field) {
            if ($field->hasTag($tag)) {
                $matchingFieldList[]  = $field;
            }
        }
        return $matchingFieldList;
    }
350533
protected function getTags($term)
    {
        $items = [];
        foreach ($this->getOptions() as $i => $tag) {
            /** @var ArrayData $tag */
            $tagValue = $tag->Value;
            // Map into a distinct list (prevent duplicates)
            if (stripos($tagValue, $term) !== false && !array_key_exists($tagValue, $items)) {
                $items[$tagValue] = [
                    'id' => $tag->Title,
                    'text' => $tag->Value,
                ];
            }
        }
        // @todo do we actually need lazy loading limits for StringTagField?
        return array_slice(array_values($items), 0, $this->getLazyLoadItemLimit());
    }
925989
function getElementsByClassName(elem, name, tag) {
        if (elem.getElementsByClassName) {
            return elem.getElementsByClassName(name);
        }

        var elements = [];
        var elems = elem.getElementsByTagName(tag || '*');
        name = ' ' + name + ' ';

        each(elems, function (elem) {
            if ((' ' + (elem.className || '') + ' ').indexOf(name) >= 0) {
                elements.push(elem);
            }
        });

        return elements;
    }
1056103
public function getTag($tag)
    {
        return isset($this->tags[$tag]) ? $this->tags[$tag] : null;
    }
683930
private static function _tagToASN1Class(int $tag): string
    {
        if (!array_key_exists($tag, self::MAP_TAG_TO_CLASS)) {
            throw new \UnexpectedValueException(
                "Type " . Element::tagToName($tag) .
                     " is not valid DirectoryString.");
        }
        return self::MAP_TAG_TO_CLASS[$tag];
    }