ZF-6433: PHP VO's don't return fields prefixed with "_" to Actionscript.

Description

Any fields prefixed with "" will be explicitly excluded by the amf3 serializer. This is in lines 288-317 of Serializer.php. I had to downgrade to the old serializer to get it to work. Removing the check for "" in the parameter name would work also, but I am not sure why this is here. Perhaps a different routine should be use for the body of the message. Here is the code: switch($encoding) { case Zend_Amf_Constants::ET_PROPLIST: $count = 0; foreach($object as $key => $value) { if( $key[0] != "_") { $count++; } } $traitsInfo |= ($count << 4);

                // Write the object ID
                $this->writeInteger($traitsInfo);

                // Write the classname
                $this->writeString($className);

                // Write the object Key's to the output stream
                foreach ($object as $key => $value) {
                    if( $key[0] != "_") {
                        $this->writeString($key);
                    }
                }

                //Write the object values to the output stream.
                foreach ($object as $key => $value) {
                    if( $key[0] != "_") {
                        $this->writeTypeMarker($value);
                    }
                }
                break;

Comments

using an underscore is a common naming practice for private and protected variables in PHP. This variables become transient variables that do not need to be passed between php and AS as only public variables can be mapped on it's counterpart.