EAuthServiceBase::getAttribute PHP Method

getAttribute() public method

Returns the authorization attribute value.
public getAttribute ( string $key, mixed $default = null ) : mixed
$key string the attribute name.
$default mixed the default value.
return mixed the attribute value.
    public function getAttribute($key, $default = null)
    {
        $this->_fetchAttributes();
        $getter = 'get' . $key;
        if (method_exists($this, $getter)) {
            return $this->{$getter}();
        } else {
            return isset($this->attributes[$key]) ? $this->attributes[$key] : $default;
        }
    }