CakePHP CPAMF flex VO object flash integration

Well thank god for that!

After a few days of stressing and pulling out hair, and with the help of one young dutch genius we managed to resolve the cake cpamf plugin VO integration.

Firstly, things to know about cake:

  1. Cake REQUIRES all models to be in the “models” directory.
  2. CPAMF plugin is installed in in the “plugins” directory.
  3. You can view all controllers/services at /cpamf/browser
  4. The gateway that flash connects to is /cpamf/gateway (not /cpamf/gateway.php as the default seems to think).
  5. CPAMF does NOT use the vendor/services/vo directory that is inside the amfphp part of the plugin.

Flash RemoteClass alias can be any path

e.g.

package
[RemoteClass(alias="org.test.TestOp")]
/**
* @author
*/
public class TestOP
{
public var username:String;
public var password:String;
public var id:int;
public function TestOP( username:String=null, password:String=null, id:int=0) {
this.username = username;
this.password = password;
this.id = id;
}
}
}

This class path MUST be represented in the PHP class using the _explicitType = ‘org.test.TestOp’. Once this is done you can pass back this class through any controller method.

e.g.

class TestOp {
public $_explicitType = 'org.test.TestOp';
public $username;
public $password;
public $id;
}

So, as you can see from the above, the PHP class MUST have the full package path to the flash class, and your class will be “models/test_op.php” as cake has a horrid non-pear style naming convention.

Tags: , ,

2 Responses to “CakePHP CPAMF flex VO object flash integration”

  1. WALTER says:


    CheapTabletsOnline.com. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. No prescription pills. Order drugs online

    Buy:Soma.Maxaman.Super Active ED Pack.Cialis Soft Tabs.Cialis.Tramadol.Cialis Professional.Levitra.Viagra Super Active+.Propecia.Viagra Professional.Viagra Soft Tabs.Cialis Super Active+.Viagra Super Force.Zithromax.VPXL.Viagra….

  2. JULIAN says:


    CheapTabletsOnline.com. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. Online Pharmacy. Buy pills online

    Buy:Synthroid.Accutane.Valtrex.Human Growth Hormone.Nexium.Prednisolone.100% Pure Okinawan Coral Calcium.Petcam (Metacam) Oral Suspension.Retin-A.Prevacid.Lumigan.Zyban.Zovirax.Actos.Arimidex.Mega Hoodia….

Leave a Reply