yii\authclient\OpenId::fetchSregAttributes PHP Method

fetchSregAttributes() protected method

Gets SREG attributes provided by OP. SREG names will be mapped to AX names.
protected fetchSregAttributes ( ) : array
return array array of attributes with keys being the AX schema names, e.g. 'contact/email'
    protected function fetchSregAttributes()
    {
        $attributes = [];
        $sregToAx = array_flip($this->axToSregMap);
        foreach ($this->data as $key => $value) {
            $keyMatch = 'openid_sreg_';
            if (strncmp($key, $keyMatch, strlen($keyMatch))) {
                continue;
            }
            $key = substr($key, strlen($keyMatch));
            if (!isset($sregToAx[$key])) {
                // The field name isn't part of the SREG spec, so we ignore it.
                continue;
            }
            $attributes[$sregToAx[$key]] = $value;
        }
        return $attributes;
    }