SabreAMF featured on Adobe DevNet and 0.4 out

Renaun Erickson wrote an article about SabreAMF on Adobe DevNet. Be sure to check it out!

It explains how to create AMF services and provides a class that locates servers and automatically invokes methods using SabreAMF.

SabreAMF 0.4

0.4 was also released (actually it was a while back, so I’m a little late with announcing). Here’s the changes:

  1. Added SabreAMF_DetailException. This is an interface you can use on your exceptions. It introduces the getDetail() method, which allows you to provide more information about the exception that occured, in a way thats native for Flash and Flex.
  2. Added SabreAMF_ClassNotFoundException, SabreAMF_UndefinedMethodException. These are default exception classes you can use in your services and provide compatibility with the exceptions ColdFusion throws.
  3. Added event handlers for the classmapper, using this you can provide auto-class mapping features without knowing the classnames beforehand, here’s an example:

function myClassMapper($remoteClass) {

  // this function receives a Flash/Flex class and should return
  // the name of the corresponding PHP class or false


SabreAMF_ClassMapper::onGetLocalClass = "myClassMapper";

// If you want to know how callbacks work, read about it here:

  1. Added an onAutenticate event to SabreAMF_CallbackServer, which provides a default way to handle authentication using Flash’ setCredentials and Flex’ setRemoteCredentials.
  2. Fixed a small PHP 5.0.x compatibility bug (no guarantees for making it work, this was just low hanging fruit).

When there’s a 1.0 I will work on a proper manual, explaining all the features. (or if there are volunteers to do it now ;) ).

Web mentions