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

Issue Type: Bug Created: 2009-04-27T00:03:59.000+0000 Last Updated: 2009-05-11T20:40:36.000+0000 Status: Closed Fix version(s): Reporter: caspar harmer (rapsac) Assignee: Wade Arnold (wadearnold) Tags: - Zend_Amf

Related issues: Attachments:


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

                // Write the classname

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

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


Posted by Wade Arnold (wadearnold) on 2009-05-11T20:40:35.000+0000

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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.