public function getAttributeByName(Request $request, string $name): array
    {
        $matches = \array_filter($this->getReleasedAttributes($request), function ($key) use ($name) {
            return \strtoupper($name) == \strtoupper($key);
        }, ARRAY_FILTER_USE_KEY);
        if (empty($matches)) {
            return [];
        } else {
            return \current($matches);
        }
    }
public function getAttributeByName(Request $request, string $name): array
    {
        $matches = \array_filter($this->getReleasedAttributes($request), function ($key) use ($name) {
            return \strtoupper($name) == \strtoupper($key);
        }, ARRAY_FILTER_USE_KEY);
        if (empty($matches)) {
            return [];
        } else {
            return \current($matches);
        }
    }
public function getAttributeByName ( Request $ request , string $ name ) : array { $ matches = \ array_filter ( $ this -> getReleasedAttributes ( $ request ) , function ( $ key ) use ( $ name ) { return \ strtoupper ( $ name ) == \ strtoupper ( $ key ) ; } , ARRAY_FILTER_USE_KEY ) ; if ( empty ( $ matches ) ) { return [ ] ; } else { return \ current ( $ matches ) ; } }
Returns values for authentication related special attributes.

@param ServerRequestInterface $request PSR7 Request object
@param string                 $name    Attribute Name

@return array Array of attribute values
Returns values for authentication related special attributes .