public function getFieldAnnotationsForMatchingTag($tag, $fieldName = null) {

        if ($fieldName) {
            return isset($this->fieldAnnotations[$fieldName][$tag]) ? $this->fieldAnnotations[$fieldName][$tag] : array();
        } else {

            $matchingAnnotations = array();
            foreach ($this->getFieldAnnotations() as $field => $fieldAnnotations) {
                if (isset($fieldAnnotations[$tag])) {
                    $matchingAnnotations[$field] = $fieldAnnotations[$tag];
                }
            }

            return $matchingAnnotations;

        }
    }
public function getFieldAnnotationsForMatchingTag($tag, $fieldName = null) {

        if ($fieldName) {
            return isset($this->fieldAnnotations[$fieldName][$tag]) ? $this->fieldAnnotations[$fieldName][$tag] : array();
        } else {

            $matchingAnnotations = array();
            foreach ($this->getFieldAnnotations() as $field => $fieldAnnotations) {
                if (isset($fieldAnnotations[$tag])) {
                    $matchingAnnotations[$field] = $fieldAnnotations[$tag];
                }
            }

            return $matchingAnnotations;

        }
    }
public function getFieldAnnotationsForMatchingTag ( $ tag , $ fieldName = null ) { if ( $ fieldName ) { return isset ( $ this -> fieldAnnotations [ $ fieldName ] [ $ tag ] ) ? $ this -> fieldAnnotations [ $ fieldName ] [ $ tag ] : array ( ) ; } else { $ matchingAnnotations = array ( ) ; foreach ( $ this -> getFieldAnnotations ( ) as $ field => $ fieldAnnotations ) { if ( isset ( $ fieldAnnotations [ $ tag ] ) ) { $ matchingAnnotations [ $ field ] = $ fieldAnnotations [ $ tag ] ; } } return $ matchingAnnotations ; } }
Get any field annotations with a matching tag.  Return these indexed by field name.

@param $string
Get any field annotations with a matching tag . Return these indexed by field name .