[SabreAMF] Mapping continue to don't work well

Oscar scriviaoscar at yahoo.it
Mon Feb 2 06:15:17 PST 2009


Continue to don't work well, I done this try:

business in PHP and Flex
<?
class Utente{
  var $idUtente;
  var $nome;

}
?>

package business{
    [RemoteClass(alias="business.Utente")]
    [Bindable]
    public class Utente    {
        public var idUtente:uint;
        public var nome: String = "pluto";
        
    }
}


function that I call into flex across SabreAMF, function PHP:

public function myFun($u){
      SabreAMF_ClassMapper::registerClass("business.Utente","Utente");
      print_r($u);
      print($u->nome);
      $u->nome = "pippo";
    
      return $u;
}

the result is:

"print_r($u)" print the object:

SabreAMF_TypedObject Object
(
    [amfClassName:private] => business.Utente
    [amfData:private] => Array
        (
            [idUtente] => 0
            [nome] => pluto
        )

)

"print($u->nome)" don't print nothing that is "" (character empty)

in
flex I receive the object "Utente", so I can print "utente.nome" on
flex and it print "pluto" and not "pippo" that I've updated into
"myFun".

the class Utente has mapped because if I call into
"myFun" the function
"SabreAMF_ClassMapper::getLocalClass('business.Utente')" I receive
"Utente".

While it work almost well if myFun is:

public function myFun($u){
      SabreAMF_ClassMapper::registerClass("business.Utente","Utente");
      print_r($u);
      print($u->nome);
      $u->nome = "pippo";
    
      return $u->nome;
}

in fact "print_r($u)" print like before, "print($u->nome)" print like before, while in flex I receive the string "pippo".

The problem is with the objects., that is to work into PHP with the object received from flex.

Thanks a lot



      



More information about the sabreamf mailing list