public function firstOf(string $name): Attribute
    {
        $attr = $this->_findFirst($name);
        if (!$attr) {
            throw new \UnexpectedValueException("No $name attribute.");
        }
        return $attr;
    }
public function firstOf(string $name): Attribute
    {
        $attr = $this->_findFirst($name);
        if (!$attr) {
            throw new \UnexpectedValueException("No $name attribute.");
        }
        return $attr;
    }
public function firstOf ( string $ name ) : Attribute { $ attr = $ this -> _findFirst ( $ name ) ; if ( ! $ attr ) { throw new \ UnexpectedValueException ( "No $name attribute." ) ; } return $ attr ; }
Get first attribute by OID or attribute name.

@param string $name OID or attribute name
@throws \OutOfBoundsException
@return Attribute
Get first attribute by OID or attribute name .