public function getMethodAnnotationsForMatchingTag($tag, $methodName = null) {
        if ($methodName) {
            return isset($this->methodAnnotations[$methodName][$tag]) ? $this->methodAnnotations[$methodName][$tag] : array();
        } else {
            $matchingAnnotations = array();
            foreach ($this->getMethodAnnotations() as $method => $methodAnnotations) {
                if (isset($methodAnnotations[$tag])) {
                    $matchingAnnotations[$method] = $methodAnnotations[$tag];
                }
            }

            return $matchingAnnotations;
        }
    }
public function getMethodAnnotationsForMatchingTag($tag, $methodName = null) {
        if ($methodName) {
            return isset($this->methodAnnotations[$methodName][$tag]) ? $this->methodAnnotations[$methodName][$tag] : array();
        } else {
            $matchingAnnotations = array();
            foreach ($this->getMethodAnnotations() as $method => $methodAnnotations) {
                if (isset($methodAnnotations[$tag])) {
                    $matchingAnnotations[$method] = $methodAnnotations[$tag];
                }
            }

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

@param $tag
@param $methodName
@return null
Get any method annotations with a matching tag . Return these indexed by field name .