CpAmf v0.11 released
IMPORTANT: Cpamf is updated to v0.12. This is a bugfix release, so it is highly recommended to update to this version. For more details check the release_notes.txt. To get the new version check the download section below.
Introduction
CpAmf v0.11 is released. There are some minor enhancements, and bug fixes in this release:
- Service browser displays methods beginnig with specified prefix
- Debug mode always 0
- CpAmf works with CakePHP Auth component
Using the service browser
AMFPHP comes with a handy utility called service browser, which is useful for testing the services (or in this case controllers). Although you can test your controllers with CakePHP itself, but if you want to test them using flash remoting you can use the service browser. The browser is accessible at the following url:
yourdomain.com/cpamf/browser
NOTE: The service browser is accessible only when the 'Cpamf.serviceBrowserEnabled' is set to 1 in the cpamf_app_controller.
CakePHP controllers have many inherited methods from the AppController, and usually we don't need to see nor access them through the service browser. If the method prefix is set in the vendors/amfphp/globals.php (define( "METHOD_PREFIX", "prefix" );), then the service browser will only display methods beginning with the specified prefix.
Debug mode disabled
The CakePHP debug mode is always set to 0 in the CpAmf plugin's AppController. This is a necessary step to prevent the CakePHP's SQL Log to appear in the output. Any unwanted strings in the output would result in a "Channel Disconnected" error on the Flex client side.
Authentication
In the previous version of the CpAmf plugin there was a problem using the plugin with the enabled Auth component. In this release this bug is fixed. When the Auth component is enabled, the cpamf plugin allows three actions in cpamf_controller: index, gateway, and browser. These actions are allowed to all users. All other controller actions (used through the CpAmf plugin) are controlled by the main application.
You can find more information about the usage of the Auth component here:
http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1
More information
For more information about this plugin see the included readme.txt, or check out the previous CpAmf article:
http://carrotplant.com/en/blog/flex-remoting-with-cakephp-cpamf-plugin