Flash Builder 4.5 for PHP
You are in Using Flash Builder 4.5 for PHP.
For information on Flash Builder 4.5 for PHP that is not included here, see the Zend Studio User Guide or Using Adobe Flash Builder 4.5.
In this Topic Hide
Flex/PHP Support allows your Flex project to be aware of, and interact with, the PHP project you define. This will create the connection that combines your Flex or Flex Mobile and PHP projects to one another. PHP Support must be enabled before you can work with your Flex/PHP or Flex Mobile/PHP Application. If you create a Flex/PHP or Flex Mobile/PHP project using the corresponding new project wizard, PHP Support is enabled by default.
To access the PHP Support Properties page, right-click a Flex or Flex Mobile project in the Package Explorer view and select Properties | Flex/PHP Support -or- select the project and from the menu bar go to Project | Properties | Flex/PHP Support.

The Flex/PHP Support Properties page is made up of the following:
From the Flex/PHP Support Properties page you can enable and disable PHP Support.
Flash Builder 4.5 for PHP allows you to create combined Flex and PHP applications. The gateway is responsible for converting objects and translating the results from PHP methods into native ActionScript objects used in the Flex User Interface.
The gateway script initializes the Zend AMF Server, which is able to translate between Flex/ActionScript and PHP, and the Zend Framework Autoloader which enables dynamic class loading.
The gateway.php script reads configuration variables from the amf_config.ini file, located under the "public" folder of your PHP project. By default it adds the "services" and "library" folders of your PHP project, as well as the Zend Framework location to the PHP Include Path. If PHP namespace prefixes are used properly, all classes stored in the "services" and "library" folders are dynamically loaded by the Autoloader. For more information regarding dynamic class loading and PHP namespaces see Zend Framework Autoloader.
The gateway.php file is located under the "public" folder of your PHP project. Changing the file's location is available in the PHP Support Properties page.

When data from a PHP service is required in your UI (1), Flex first sends a handshake http request to the gateway.php file on the PHP server (2). After receiving an acknowledgment (4), Flex sends second http request including an AMF request for data from the PHP service (5).
On the server side, the request passes through the gateway.php file where the Zend AMF Server is initialized. The AMF request is translated into PHP object format (6), and then passed to your service where the requested data is fetched (7).
The service's response is translated back by the Zend AMF Server into AMF data (9) before being sent back to the Flex, where the response appears in the UI (10).
|
|
|
Related Links: |
|
|