protected function serializeAdditionalData(array $attr)
    {

        // serialize the additional data value if available
        if (isset($attr[MemberNames::ADDITIONAL_DATA]) && $attr[MemberNames::ADDITIONAL_DATA] !== null) {
            $attr[MemberNames::ADDITIONAL_DATA] = json_encode($attr[MemberNames::ADDITIONAL_DATA]);
        }

        // return the attribute
        return $attr;
    }
protected function serializeAdditionalData(array $attr)
    {

        // serialize the additional data value if available
        if (isset($attr[MemberNames::ADDITIONAL_DATA]) && $attr[MemberNames::ADDITIONAL_DATA] !== null) {
            $attr[MemberNames::ADDITIONAL_DATA] = json_encode($attr[MemberNames::ADDITIONAL_DATA]);
        }

        // return the attribute
        return $attr;
    }
protected function serializeAdditionalData ( array $ attr ) { // serialize the additional data value if available if ( isset ( $ attr [ MemberNames :: ADDITIONAL_DATA ] ) && $ attr [ MemberNames :: ADDITIONAL_DATA ] !== null ) { $ attr [ MemberNames :: ADDITIONAL_DATA ] = json_encode ( $ attr [ MemberNames :: ADDITIONAL_DATA ] ) ; } // return the attribute return $ attr ; }
Serialize the additional_data attribute of the passed array.

@param array $attr The attribute with the data to serialize

@return array The attribute with the serialized additional_data
Serialize the additional_data attribute of the passed array .