function _mapInAttributes(&$root, $path, $asn1)
    {
        $attributes = &$this->_subArray($root, $path);

        if (is_array($attributes)) {
            for ($i = 0; $i < count($attributes); $i++) {
                $id = $attributes[$i]['type'];
                /* $value contains the DER encoding of an ASN.1 value
                   corresponding to the attribute type identified by type */
                $map = $this->_getMapping($id);
                if (is_array($attributes[$i]['value'])) {
                    $values = &$attributes[$i]['value'];
                    for ($j = 0; $j < count($values); $j++) {
                        $value = $asn1->encodeDER($values[$j], $this->AttributeValue);
                        $decoded = $asn1->decodeBER($value);
                        if (!is_bool($map)) {
                            $mapped = $asn1->asn1map($decoded[0], $map);
                            if ($mapped !== false) {
                                $values[$j] = $mapped;
                            }
                            if ($id == 'pkcs-9-at-extensionRequest' && $this->_isSubArrayValid($values, $j)) {
                                $this->_mapInExtensions($values, $j, $asn1);
                            }
                        } elseif ($map) {
                            $values[$j] = base64_encode($value);
                        }
                    }
                }
            }
        }
    }
function _mapInAttributes(&$root, $path, $asn1)
    {
        $attributes = &$this->_subArray($root, $path);

        if (is_array($attributes)) {
            for ($i = 0; $i < count($attributes); $i++) {
                $id = $attributes[$i]['type'];
                /* $value contains the DER encoding of an ASN.1 value
                   corresponding to the attribute type identified by type */
                $map = $this->_getMapping($id);
                if (is_array($attributes[$i]['value'])) {
                    $values = &$attributes[$i]['value'];
                    for ($j = 0; $j < count($values); $j++) {
                        $value = $asn1->encodeDER($values[$j], $this->AttributeValue);
                        $decoded = $asn1->decodeBER($value);
                        if (!is_bool($map)) {
                            $mapped = $asn1->asn1map($decoded[0], $map);
                            if ($mapped !== false) {
                                $values[$j] = $mapped;
                            }
                            if ($id == 'pkcs-9-at-extensionRequest' && $this->_isSubArrayValid($values, $j)) {
                                $this->_mapInExtensions($values, $j, $asn1);
                            }
                        } elseif ($map) {
                            $values[$j] = base64_encode($value);
                        }
                    }
                }
            }
        }
    }
function _mapInAttributes ( & $ root , $ path , $ asn1 ) { $ attributes = & $ this -> _subArray ( $ root , $ path ) ; if ( is_array ( $ attributes ) ) { for ( $ i = 0 ; $ i < count ( $ attributes ) ; $ i ++ ) { $ id = $ attributes [ $ i ] [ 'type' ] ; /* $value contains the DER encoding of an ASN.1 value
                   corresponding to the attribute type identified by type */ $ map = $ this -> _getMapping ( $ id ) ; if ( is_array ( $ attributes [ $ i ] [ 'value' ] ) ) { $ values = & $ attributes [ $ i ] [ 'value' ] ; for ( $ j = 0 ; $ j < count ( $ values ) ; $ j ++ ) { $ value = $ asn1 -> encodeDER ( $ values [ $ j ] , $ this -> AttributeValue ) ; $ decoded = $ asn1 -> decodeBER ( $ value ) ; if ( ! is_bool ( $ map ) ) { $ mapped = $ asn1 -> asn1map ( $ decoded [ 0 ] , $ map ) ; if ( $ mapped !== false ) { $ values [ $ j ] = $ mapped ; } if ( $ id == 'pkcs-9-at-extensionRequest' && $ this -> _isSubArrayValid ( $ values , $ j ) ) { $ this -> _mapInExtensions ( $ values , $ j , $ asn1 ) ; } } elseif ( $ map ) { $ values [ $ j ] = base64_encode ( $ value ) ; } } } } } }
Map attribute values from ANY type to attribute-specific internal
format.

@param array ref $root
@param string $path
@param object $asn1
@access private
Map attribute values from ANY type to attribute - specific internal format .