Using Adobe Flash Builder 4.

5 for PHP

www.zend.com

Using Flash Builder for PHP

Disclaimer
Legal Notices © 2011 Adobe Systems Incorporated and its licensors. All rights reserved. Using Adobe® Flash® Builder™ for PHP

This content is protected under copyright law, furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this content. This content is licensed for use under the terms of the Creative Commons Attribution Non-Commercial 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/.

Adobe, the Adobe logo, Acrobat, Acrobat Capture, Acrobat Connect, Acrobat Messenger, Acrobat 3D Capture, ActionScript, ActiveTest, Adobe ActionSource, Adobe AIR, Adobe AIR logo, Adobe Audition, Adobe Caslon, Adobe Connect, Adobe DataWarehouse, Adobe Dimensions, Adobe Discover, Adobe Financial Services, Adobe Garamond, Adobe Genesis, Adobe Griffo, Adobe Jenson, Adobe Kis, Adobe OnLocation, Adobe Originals logo, Adobe PDF logo, Adobe Premiere, AdobePS, Adobe SiteSearch, Adobe Type Manager, Adobe Wave, Adobe Wave logo, Adobe WebType, Adobe Wood Type, After Effects, AIR, Alexa, Andreas, Arno, ATM, Authorware, Balzano, Banshee, Benson Scripts, Better by Adobe., Bickham Script, Birch, Blackoak, Blue Island, Brioso, BusinessCatalyst, Buzzword, Caflisch Script, Cairngorm, Calcite, Caliban, Captivate, Carta, Chaparral, Charlemagne, Cheq, Classroom in a Book, ClickMap, Co-Author, ColdFusion, ColdFusion Builder, Conga Brava, Contribute, Copal, Coriander, Cottonwood, Creative Suite, Critter, Cronos, CS Live, Custom Insight, CustomerFirst, Cutout, Digital Pulse, Director, Distiller, DNG logo, Dreamweaver, DV Rack, Encore, Engaging beyond the Enterprise, ePaper, Ex Ponto, Fireworks, Flash, Flash logo, Flash Access, Flash Access logo, Flash Builder, Flash Cast, FlashCast, Flash Catalyst, FlashHelp, Flash Lite, Flash on., FlashPaper, Flash Platform Services logo, Flex, Flex Builder, Flood, Font Folio, Frame, FrameCenter, FrameConnections, FrameMaker, FrameManager, FrameViewer, FreeHand, Fusaka, Galahad, Giddyup, Giddyup Thangs, GoLive, GoodBarry, Graphite, HomeSite, HBX, HTML Help Studio, HTTP Dynamic Streaming logo, Hypatia, Illustrator, ImageReady, Immi 505, InCopy, InDesign, Ironwood, Jimbo, JRun, Juniper, Kazuraki, Kepler, Kinesis, Kozuka Gothic, Kozuka Mincho, Kuler, Leander Script, Lens Profile Creator logo, Lightroom, Lithos, LiveCycle, Macromedia, Madrone, Mercado, Mesquite, Mezz, Minion, Mojo, Montara, Moonglow, MXML, Myriad, Mythos, Nueva, Nyx, 1-Step RoboPDF, Omniture, Open Screen Project, Open Source Media Framework logo, OpenType logo, Ouch!, Ovation, PageMaker, PageMaker Portfolio, PDF JobReady, Penumbra, Pepperwood, Photoshop, Photoshop logo, Pixel Bender, Poetica, Ponderosa,

ii

Table of Contents

Poplar, Postino, PostScript, PostScript logo, PostScript 3, PostScript 3i, Powered by XMP, Prana, PSPrinter, Quake, Rad, Reader, Real-Time Analytics, Reliq, RoboEngine, RoboHelp, RoboHTML, RoboLinker, RoboPDF, RoboScreenCapture, RoboSource Control, Rosewood, Roundtrip HTML, Ryo, Sanvito, Sava, Scene7, See What’s Possible, Script Teaser, Shockwave, Shockwave Player logo, Shuriken Boy, Silentium, Silicon Slopes, SiteCatalyst, SiteCatalyst NetAverages, Software Video Camera, Sonata, Soundbooth, SoundEdit, Strumpf, Studz, Tekton, Test&Target, 360Code, Toolbox, Trajan, TrueEdge, Type Reunion, Ultra, Utopia, Vector Keying, Version Cue, VirtualTrak, Visual Call, Visual Communicator, Visual Sciences, Visual Sensor, Visual Server, Viva, Voluta, Warnock, Waters Titling, Wave, Willow, XMP logo, Zebrawood are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Android is a trademark of Google Inc. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners.

Portions include software under these terms.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/).

This product includes software developed by the OpenSymphony Group (http://www.opensymphony.com/)

This product contains either BSAFE and/or TIPEM software by RSA Security, Inc.

MPEG Layer-3 audio compression technology licensed by Fraunhofer IIS and Thomson Multimedia http://www.iis.fhg.de/amm/).

This software is based in part on the work of the Independent JPEG Group. Speech compression and decompression technology licensed from Nellymoser, Inc. (www.nellymoser.com)

Sorenson Spark™ video compression and decompression technology licensed from Sorenson Media, Inc. Video in Flash Player is powered by On2 TrueMotion video technology. © 1992-2005 On2 Technologies, Inc. All Rights Reserved. http://www.on2.com.

iii

Notice to U. the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. the provisions of Executive Order 11246. Adobe agrees to comply with all applicable equal opportunity laws including. §12. Using Flash Builder 4.R. §12.R.” as that term is defined at 48 C. 60-250.” as such terms are used in 48 C. §227. and the regulations at 41 CFR Parts 60-1 through 60-60. as amended. and Section 503 of the Rehabilitation Act of 1973.5 DN: FBPHP-UG-120411-08-14 iv . Government End Users: The Software and Documentation are “Commercial Items.212 or 48 C. as amended.Using Flash Builder for PHP Adobe Systems Incorporated. Consistent with 48 C.7202.5 for PHP issued April 2011.F.F. §2.R. if appropriate. California 95110. Product Version: 4.212 or 48 C. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. as applicable. and 60-741. Unpublished-rights reserved under the copyright laws of the United States. Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212). San Jose.S. §§227.101. 345 Park Avenue.F.R.7202-4.7202-1 through 227.F.R. as applicable.F. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference. consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation. USA.

...................................... 50 Launching Your Application . 18 Registering a License ............................................................................... 40 Disabling PHP Support ......................Table of Contents Table of Contents About ............................................................................... 40 Enabling PHP Support ....................................................................................... 66 About ........................................................................................................................................................................... 34 Creating a New Flex Mobile/PHP Project .............................................................................................................................5 for PHP on Mac OS X ..................................................... 6 Installation Guide ............................................................................................. 8 Installing Flash Builder 4....................................................................................................................5 for PHP ..5 for PHP ................................................................................................................................. 18 Deactivating a License ...................................................................................................................................................................................5 for PHP on Windows .................................................................................................................................................. 19 Upgrading Flash 4........... 24 Uninstalling Flash Builder 4............................................................................................................... 8 Installing Flash Builder 4............................................................................................................................................................ 44 Binding Data ....................................................................................................................................................................................................................... 68 v ........................... 52 Debugging Your Application .............................................................................. 43 Introspecting PHP Services ............................................................................................................................................................... 7 Prerequisites ................ 51 Running Your Application .................................................................................................... 29 Working with Flash Builder 4................................................................................................................................................................... 37 Enabling/Disabling PHP Support .................................. 33 Creating a New Flex/PHP Project................................................................................................................................................................................. 66 The Gateway Script .........5 for PHP........................................... 42 Binding/PHP Introspection............................ 23 Uninstalling Flash Builder 4.....5 for PHP ................................................. 31 Creating Projects ...................................................... 20 Upgrading Flash Builder 4...............................................................................................................................................5 for PHP on Windows ...................................................... 14 License Registration .................................... 58 PHP Support Properties .... 7 Installing Flash Builder 4.....................................................................................................5 for PHP .............................................................................................................. 20 Adding an Update Site .................................................................................................................. 24 Uninstalling Flash Builder 4.................................................................................................................................................................5 for PHP on Mac .....................................................................................................

Using the functionalities of Flash Builder and Zend Studio together in one environment means you can develop the client side and server side of your application in one place. Using Flash Builder 4. which makes finding and fixing bugs easier for you. the Flash Builder 4.5 for PHP debugger allows you to debug your entire application (Flex and PHP) together. Additionally.5 for PHP • • • •  Creating Projects Enabling/Disabling PHP Support Binding/PHP Introspection Launching Your Application PHP Support Properties 6 .5 for PHP is an integrated IDE based on Eclipse Helios that allows you to develop and test the Flex and PHP sides of your application together.5 for PHP includes the following:   Installation Guide Working with Flash Builder 4.About Flash Builder 4.

Using Flash Builder 4. or a compatible PHP application server. Zend Server 5. For more information see the Zend Server Installation Guide.5 for PHP. 2. You will need a PHP application server to debug your application. 5.5 for PHP. Close all applications running on your machine. 4.x or above. ensure that you have UAC permissions for the folder “C:\inetpub\wwwroot ”. It is recommended to temporarily turn off virus protection during the installation process. 7 . If you installed the optional components MySQL and phpMyAdmin.5 for PHP from your machine. 3.x. If you are using Windows 7 and IIS. Once you have met the prerequisites you can install Flash Builder 4.5 for PHP Installation Guide Prerequisites This section describes the system requirements and components required to install and run Flash Builder 4.zend.com/en/downloads/ to downlaod Zend Server 5. Uninstall any existing installations of Adobe Flash Builder 4. ensure that you have UAC permissions for the folder “C:\Program Files\Zend\Apache2\htdocs”. Note: If you are using Windows 7 and Apache. the credentials are by default “root” as the username with no password. Close any running browsers on your machine. Minimum System Requirements For the most up to date system requirements see Flash Builder's System Requirements. The prerequisites are: 1. Note: Make sure to save the username and password for your Zend Server. Go to http://www. the Zend PHP application server. which allows you to develop and debug your Flex and PHP code in one integrated IDE.

Go to http://www. Click Run in the dialog to launch the Installer.5 for PHP make sure all prerequisites have been met.5 for PHP: 1.Insert the DVD in your drive and follow the on-screen instructions to launch the installer.5 for PHP installation file. in a temporary location on your machine.exe”.com/en/products/studio/flash-builder-for-php/downloads and save the Flash Builder 4.5 for PHP Before installing Flash Builder 4. 8 . Installing Flash Builder 4. The File Download Complete dialog will inform you when the download is complete.5 for PHP on Windows This procedure describes how to install Flash Builder 4.zend. "FlashBuilderPHP_4_5_LS1. To install Flash Builder 4. 2.5 for PHP on Windows.Installing Flash Builder 4. The Introduction dialog opens. -OR.

5 for PHP 3. To see the Zend license click Zend in the left window. Select the ‘I accept the terms of both Adobe and Zend’ checkbox and click Next to open the Choose Installation Folder dialog.Using Flash Builder 4. 9 . Click Next to open the License Agreement dialog. 4.

5. 10 . To select a location other than the default click Choose. Otherwise click Next to install to the default location. The Pre-Installation Summary Dialog opens.

11 .Using Flash Builder 4. The Installing Adobe Flash Builder dialog opens. If any of the information is incorrect click Previous to change it in a previous screen.5 for PHP 6. Review the information in the dialog. If the information is correct click Install.

When the installation is finished the Installation Complete dialog opens.7. 12 .

13 .Using Flash Builder 4. To register your product with Adobe and Zend click on the links in the dialog. For information on uninstallation see Uninstalling Flash Builder PHP Edition.5 for PHP see License Registration. To activate Flash Builder 4.5 for PHP. or to start working with Flash Builder 4.5 for PHP 8.5 for PHP see Working with Flash Builder 4.5 for PHP. Select the 'Start Flash Builder for PHP' checkbox and click Done to exit the installation process and open Flash Builder 4.

zend. The Introduction dialog opens. “FlashBuilderPHP_4_5_LS1. -OR. in a temporary location on your machine.Installing Flash Builder 4. 2. Go to http://www.5 for PHP on Mac OS X This procedure describes how to install Flash Builder 4. To install Flash Builder 4.5 for PHP installation file. When the download is complete click Setup to begin the installation.5 for PHP on Mac OS X. 14 .dmg”.5 for PHP: 1.Insert the DVD in your drive and follow the on-screen instructions to launch the installer.com/en/products/studio/flash-builder-for-php/downloads and save the Flash Builder 4.

Click Next to open the License Agreement dialog. 4. 5. 15 . Otherwise click Next to install to the default location. To see the Zend license click Zend in the left window.5 for PHP 3. Select the ‘I accept the terms of both Adobe and Zend’ checkbox and click Next to open the Choose Installation Folder dialog.Using Flash Builder 4. To select a location other than the default click Choose.

16 . If the information is correct click Install. 6. The Installing Adobe Flash Builder dialog opens. Review the information in the dialog. When the installation is finished the Installation Complete dialog opens.The Pre-Installation Summary Dialog opens. If any of the information is incorrect click Previous to change it in a previous screen. 7.

or to start working with Flash Builder 4. Select the 'Start Flash Builder for PHP' checkbox and click Done to exit the installation process and open Flash Builder 4.5 for PHP is now installed on your machine.5 for PHP see Working with Flash Builder 4.Using Flash Builder 4. To activate Flash Builder 4. To register your product with Adobe and Zend click on the links in the dialog.5 for PHP 8.5 for PHP.5 for PHP.5 for PHP see License Registration. 17 .5 for PHP. For information on uninstallation see Uninstalling Flash Builder 4. Flash Builder 4.

18 . To enjoy the full range of Flash Builder 4. it is valid. The Flash Builder 4.5 for PHP on your machine.5 for PHP functionality. At the end of the 60 day trial. To register a license: 1. If you have already entered a license into Flash Builder 4.License Registration Once Flash Builder 4. the professional features will be disabled. Note: A Flash Builder license is not valid for Flash Builder 4.5 for PHP but would like to change it. the license is not valid.5 for PHP Trial dialog opens. 2. all its features will be available for a 60 day trial.5 for PHP is installed. Open Flash Builder 4.5 for PHP license.5 for PHP license. Mark the 'Provide a serial number' box and enter your serial number. If a red X appears. If a green check appears next to the serial number. you must first deactivate the license and close the product. you need to register a valid Flash Builder 4. Registering a License This procedure describes how to register a valid Flash Builder 4.5 for PHP.

This option will deactivate a Flash Builder 4. Deactivate Permanently .5 for PHP opens with all of the functionalities available.Using Flash Builder 4. Select the desired option and click Done. This dialog has the following options:   Suspend Activation .5 for PHP license. To deactivate a license: 1.5 for PHP license and allow you to activate with a different license the next time you run the product.5 for PHP. This will deactivate your Flash Builder 4. The Deactivation dialog opens.5 for PHP. 3. you must have first registered a valid license. 2. 19 . 4. Once you have entered a valid license click Continue. After deactivating the product. Close Flash Builder 4.This option will not deactivate a Flash Builder 4. In order to deactivate a license.5 for PHP 3. Flash Builder 4. Deactivating a License This procedure describes how to deactivate a license. Go to Help Deactivate | Flash Builder 4. For more information see Registering a License.Deactivates the product and removes your serial number. you must register a valid license to use the functionalities of Flash Builder 4. For information on how to deactivate your license see Deactivating a License.5 for PHP for the deactivation to take effect.5 for PHP and all of its functionalities.

To update an existing Flash Builder 4. Note: In order to update you should sign on to your operating system with the same user permissions that were used during the initial installation of Flash Builder 4.5 for PHP Before upgrading you must have installed Flash Builder 4. Upgrading Flash Builder 4.5/eclipse/configuration/" 2.Upgrading Flash 4. Important Note: To update on a Mac. From the Menu Bar.5 for PHP with administrative privileges. Windows .5 for PHP installation: 1.5 for PHP as an administrator by selecting Run as Administrator from the applications Right Click Menu.5 for PHP.5.5 for PHP's update site is already set as an available Update Site. Mac . The Contacting Software Sites screen opens with a progress bar as it searches for available updates. 20 .Run Flash Builder 4. 3.app/Contents/MacOS/Adobe Flash Builder 4.5 for PHP. go to Help | Software Updates.5" -configuration "/Applications/Adobe Flash Builder 4. To learn how to add an update site manually see Adding an Update Site.5 for PHP This procedure describes how to upgrade Flash Builder 4.5/Adobe Flash Builder 4. you must first start Flash Builder with following command: "/Applications/Adobe Flash Builder 4.Launch Flash Builder 4. the Available Updates wizard opens. If there are any updates. Flash Builder 4.5 for PHP when there is already a previous version installed.

5 for PHP 4. Select which updates you would like to install and click Next.Using Flash Builder 4. 5. The Update Details dialog opens. The Review Licenses dialog opens. Review and confirm the updates that are waiting to be installed and click Next. 21 .

and select a license to display it in the License text box. The Update screen opens with a progress bar of the updates. 8. From this screen you can:  Run the update in the background .Click Details to expand or collapse the details of the update.6.Choose to run the updates in the background by clicking Run in Background or mark the ‘Always run in background’ checkbox to save your choice for the future. Review the licenses in the dialog.   Cancel the update . Expand a node in the Licenses box to see the different licenses available. When prompted to restart Flash Builder 4. Expand/collapse the update details . 7. Mark the ‘I accept the terms of the License Agreements’ checkbox and click Finish. The progress bar will close when the updates are complete. 22 .Click Cancel to cancel the update.5 for PHP click Restart Now for the update to take effect.

The Flash Builder 4. Go Window | Preferences | Install/Update | Available Software Sites. 23 . 3. Click OK to return to the Available Software Sites Preferences page with your update site added. The Available Software Sites Preferences page opens.5 for PHP update site is "http://downloads. Click OK to save the changes. You can now upgrade Flash Builder 4. 5. Your update site has been added.zend. Click Add to open the Add Site dialog.com/fbphp/updates/4_5".5 for PHP Adding an Update Site To add an update site: 1. 2. Enter a name and URL for your update site.5 for PHP. 4.Using Flash Builder 4.

5 for PHP. Adobe Flash Builder 4. Select Adobe Flash Builder 4.5 Uninstalling Adobe Flash Builder 4. The Uninstall Adobe Flash Builder 4.5 for PHP Uninstalling Flash Builder 4. In the Control Panel select Add or Remove Programs. 3. 2. you can uninstall one of the following options:   Adobe Flash Builder 4.5 for PHP .5.Select this option to uninstall the Adobe Flash Builder components. Close any running instance of Flash Builder 4.5 wizard opens.5 for PHP on Windows When uninstalling Flash Builder 4. Uninstalling Adobe Flash Builder 4.Uninstalling Flash Builder 4. 4.Select this option to uninstall the Zend toolbars and PHP components.5 . To uninstall the PHP components of Flash Builder 4. 24 .5: 1.5 will uninstall the Flash Builder components of the product.5 for PHP see Uninstalling Adobe Flash Builder 4.5 for PHP on windows. A list of all programs appears.5 for PHP and go to the Start menu on your computer and select the Control Panel. To Uninstall Adobe Flash Builder 4.

5 for PHP 5. Click Uninstall to uninstall the product. The Uninstall tab opens. 25 .Using Flash Builder 4.

When the uninstallation is complete the Uninstall Complete dialog opens. Click Done to close the dialog. For information on installing the product see Installing Flash Builder 4.5 for PHP. 26 .6. 7.

4. The Uninstall Adobe Flash Builder 4. The Uninstalling Adobe Flash Builder dialog opens. To uninstall the Flash Builder components of Flash Builder 4. 5.5 for PHP Uninstalling Adobe Flash Builder 4. 3. 2. To Uninstall Flash Builder 4. Close any running instance of Flash Builder 4.Using Flash Builder 4.5 for PHP Uninstalling Adobe Flash Builder 4. Select Adobe Flash Builder 4. In the Control Panel select Add or Remove Programs.5 for PHP will uninstall the PHP components of the product.5 for PHP. A list of all programs appears. 27 . Click Uninstall to uninstall the product.5 for PHP: 1.5 for PHP see Uninstalling Adobe Flash Builder 4.5 for PHP wizard opens.5.5 for PHP and go to the Start menu on your computer and select the Control Panel.

6. For information on installing the product see Installing Flash Builder 4.5 for PHP. Click Done to close the dialog. 7. 28 . When the uninstallation is complete the Uninstall Complete dialog opens.

5 for PHP on Mac: 1. Close any running instance of Flash Builder 4. When the unistallation is finished the Finish dialog opens.5 for PHP Uninstalling Flash Builder 4. and click Uninstall Adobe Flash Builder. 3. The Uninstall Options dialog opens. Go to the directory in which you placed Flash Builder 4.5 for PHP on Mac To uninstall Flash Builder 4.Using Flash Builder 4. Click Uninstall. 4. 2.5 for PHP. 29 .5 for PHP during the installation process.

5 for PHP.For information on installing the product see Installing Flash Builder 4. 30 .

5 for PHP Working with Flash Builder 4. whether it be a web or mobile application. or each one separately. Flash Builder 4. the integrated debugger gives you the option to debug both sides of your application simultaneously.5 for PHP's functionalities make creating an application with a Flex client side and a PHP server side easy.Using Flash Builder 4.5 for PHP is an integrated IDE based on Eclipse Helios that allows you to develop and test the Flex and PHP sides of your application together. Flash Builder 4. Additionally.5 for PHP allows you to perform the following tasks:  Create Projects • •   Create a New Flex/PHP Project Create a New Flex Mobile/PHP Project Enable/Disable PHP Support Bind Data/PHP Introspection 31 . Flash Builder 4.5 for PHP Flash Builder 4.5 for PHP simplifies creating your application by offering an easy to follow workflow that can be adjusted according to your specific needs.

• •  • • • • Introspect PHP Services Bind Data Launch Your Application Run a Flex/PHP Application Run a Flex Mobile/PHP Application Debug a Flex/PHP Application Debug a Flex Mobile/PHP Application 32 .

The Flex (or Flex Mobile) project automatically has PHP Support enabled. and developers/back end developers (PHP server side).5 for PHP allows you to create:   A Flex/PHP Project A Flex Mobile/PHP Project 33 . creating modular code. This gives you the advantage of being able to distinguish between Flex developers (client side). and one PHP project.5 for PHP Creating Projects Flash Builder 4. which allows the two projects to be independent and yet still be aware of one another so that they can create one joint application.Using Flash Builder 4.5 for PHP allows you to create a Flex/PHP project and a Flex Mobile/PHP project. Flash Builder 4. Creating these creates a pair of projects. one Flex (or Flex Mobile) project.

which allows the two projects to be independent and yet still be aware of one another so that they can create one joint application.Creating a New Flex/PHP Project Creating a Flex/PHP project creates a pair of projects. To create a new Flex and PHP project: 1. Go to File | New | Flex and PHP Project. right-click and select New | Flex and PHP Project. -Or. one Flex web project (an application that runs in Flash Player in a browser). This gives you the advantage of being able to distinguish between Flex developers (client side). creating modular code. The Flex web project automatically has PHP Support enabled..In the Package Explorer view. and one PHP project. 34 . and developers/back end developers (PHP server side). The New Flex and PHP Project wizard opens.

Enter the following • Web Root . •  Framework version . enter the following information:   Project name .5 for PHP 2. 35 . Create project at existing location (from existing source) .5 for PHP cannot validate the configuration. The Create Flex Project dialog opens.The name for your PHP project. for example “C:\Program Files\Zend\Apache2\htdocs”.Creates a PHP project pointing to files situated outside of the workspace. This dialog contains the details of your PHP project. Contents . Click Browse to select the required source content. If Flash Builder 4. Server location .Creates the project on a local server.Creates a new PHP project in the workspace directory.Using Flash Builder 4. The web root is the directory where your web pages exist in your server. Click Validate Configuration. 3. If the configuration has been validated click Next.The URL of your server. for example “http://localhost”. In the dialog. • Create project on a local server . • Root URL . This option will only be available if a local Zend Server has been configured in the PHP Servers Preferences.Select the Zend Framework version you would like to work with from the dropdown menu. review your web root and root URL and make sure they both exist on the machine. 4.Select whether to: • • Create new project in workspace .The document root of your server.

Select an output folder for your compiled Flex/PHP application.Use a different SDK than the default. You can now use a PHP class you create and perform PHP Introspection to begin binding the data. By default they are stored in the “public” folder of your PHP project. where compiled output files are stored. the "bin-debug" folder of your Flex project will refer to this folder. 36 .The name for your Flex project. Click Finish. Use a specific SDK . or select your own by clicking Browse. Output folder .Mark this check-box to use the default SDK.  Flex SDK version . To achieve streamlined debugging. 6.5.Decide whether to use the default location.Select whether to: • • Use default SDK (currently “Flex Hero”) .    Enter the following information: Project Name . Project location . Your Flex/PHP application is created. Creating a Flex/PHP application creates a PHP project and a Flex Web project with PHP Support enabled in your workspace.

In the Package Explorer view. creating modular code.5 for PHP Creating a New Flex Mobile/PHP Project Creating a Flex Mobile/PHP project creates a pair of projects. To create a new Flex Mobile and PHP project: 1..Using Flash Builder 4.Flex The New Flex Mobile and PHP Project wizard opens. and developers/back end developers (PHP server side). which allows the two projects to be independent and yet still be aware of one another so that they can create one joint application. one Flex mobile project. This gives you the advantage of being able to distinguish between Flex developers (client side). -Or. and one PHP project. 37 . Go to File | New | Flex Mobileand PHP Project. The Flex mobile project automatically has PHP Support enabled. right-click and select New | Flex Mobile and PHP Project.

Contents .2. review your web root and root URL and make sure they both exist on the machine.The URL of your server.Select whether to: • • Create new project in workspace .The name for your PHP project. 3. The Create PHP Project dialog contains the details of your PHP project. This option will only be available if a local Zend Server has been configured in the PHP Servers Preferences.Select the Zend Framework version you would like to work with from the dropdown menu. Click Browse to select the required source content.Creates a new PHP project in the workspace directory. Create project at existing location (from existing source) . enter the following information:   Project name .Enter the following • Web Root .5 for PHP cannot validate the configuration. The Create Flex Mobile Project dialog opens. If Flash Builder 4. • Root URL . •  Framework version .Creates a PHP project pointing to files situated outside of the workspace. • Create project on a local server . 38 . 4.Creates the project on a local server.The document root of your server. for example “http://localhost”. The web root is the directory where your web pages exist in your server. Click Validate Configuration. In the dialog. Server location . If the configuration has been validated click Next. for example “C:\Program Files\Zend\Apache2\htdocs”.

5 for PHP 5. By default they are stored in the “bin-debug” folder of your Flex project.Select an output folder for your compiled Flex Mobile/PHP application. You can now use a PHP class you create and perform PHP Introspection to begin binding the data. Click Finish. or select your own by clicking Browse. where compiled output files are stored. Output folder .    Enter the following information: Project Name . 6.The name for your Flex Mobile project. Creating a Flex/PHP application creates a PHP project and a Flex project with PHP Support enabled in your workspace.Use a different SDK than the default. Project location .Select whether to: • • Use default SDK (currently “Flex Hero”) . Your Flex Mobile/PHP application is created.  Flex SDK version .Using Flash Builder 4. Use a specific SDK . 39 .Decide whether to use the default location.Mark this check-box to use the default SDK.

which associates your Flex project with a PHP project. Enabling PHP Support This procedure describes how to enable PHP Support. Select the Flex project you would like to enable and go to Project | Properties | Flex/PHP Support . Note: If you have created a new Flex and PHP project or created a new Flex Mobile and PHP project. The Flex/PHP Support Properties page opens.Or . 40 . This will create a Flex/PHP or Flex Mobile/PHP application. the PHP project you define.Enabling/Disabling PHP Support Enabling PHP Support allows you to connect an existing PHP project to an existing or new Flex project. PHP Support allows your Flex Project to be aware of. PHP Support can be enabled for a Flex or Flex Mobile project which was created separately from the PHP project. Before enabling PHP Support you must have a Flex or Flex Mobile project and a PHP project in your workspace. To enable PHP Support: 1.Select Properties | Flex/PHP Support from the Right Click Menu of your project directory. PHP Support must be enabled before you can introspect your PHP service. and interact with. PHP Support is automatically enabled for the projects.

3.   Gateway location . For example. your root URL can be “http://localhost”.Select an output folder for your compiled Flex/PHP application.The URL of your server.Enter the following: • •  Web root . Enter the following information:  Server options . review your web root and root URL and make sure they both exist on the machine. For more information see The Gateway Script.Using Flash Builder 4. If Flash Builder 4. 41 . PHP Support is enabled.The location of your gateway file. for example “C:\Program Files\Zend\Apache2\htdocs”. PHP Project Name .The web server's directory. The gateway file is located in your Web Root directory.Select a PHP project from the dropdown menu to associate with your Flex project. The output folder is where the debug output is kept. Click Apply and OK to apply and save the changes. 4.5 for PHP 2.5 for PHP cannot validate the configuration. Mark the ‘Enable PHP Support’ checkbox. You can now begin working with your Flex/PHP application or disable PHP Support. Output folder . Root URL . 5. which by default is stored in the “public” folder of your PHP project. Click Validate Configuration.

but will instead have two separate projects which have no knowledge of one another. The Flex/PHP Support Properties page opens. Once PHP Support is disabled. You can now enable PHP Support. PHP Support can only be disabled if the Flex project was previously associated with a PHP project (either by enabling PHP Support or by creating a Flex/PHP or Flex Mobile/PHP project). 2. To disable PHP Support: 1. 3.Select Properties | Flex/PHP Support from the Right Click Menu of your project directory. PHP Support is disabled. Select the Flex project you would like to disable and go to Project | Properties | Flex/PHP Support . Disabling PHP Support will disassociate your Flex or Flex Mobile project with your PHP project. Click Apply and OK to apply and save the changes. Unmark the ‘Enable PHP Support’ checkbox.Disabling PHP Support This procedure describes how to disable PHP Support. 42 .Or . you will not be able to work with your Flex/PHP or Flex Mobile/PHP application.

5 for PHP Binding/PHP Introspection Binding is the process which allows you to connect your PHP code to your Flex code. Once your Flex project is aware of the PHP service. Flash Builder 4.5 for PHP allows you to:   Inrospect PHP Services Bind the Data 43 .Using Flash Builder 4. Introspecting PHP services allows you to connect a specific PHP service to your Flex project. you can bind the data together by tying specific Flex components to specific operations (PHP methods).

and enable PHP Support. The PHP methods you define in your PHP service are used as operations for the Flex side of your application. Performing PHP Introspection via the Right Click Menu This procedure describes how to perform PHP Introspection from the Right Click Menu of your PHP service. You can use an existing PHP service. PHP Introspection will connect the PHP service you choose with the Flex project currently associated with it.Introspecting PHP Services PHP Introspection allows you to connect your Flex project to a pre-defined PHP service. The Configure Zend Studio PHP Service dialog opens. as defined in the PHP Support Properties page. This makes the methods in the PHP service easily accessible while developing the client side of your application. or write one in a PHP file.go to Data | Connect to Data/Service. A PHP service is a PHP class containing PHP methods. which can be manually accessed by going to Window | Open Perspective | Flash. 44 . Before performing PHP Introspection you must create a PHP class in a PHP file. 2. In the Package Explorer or PHP Explorer view select Create PHP Service for Flex from the Right Click Menu of your PHP service. To perform PHP Introspection via the Right Click Menu: 1. Important Note: The PHP file must have the same name as the PHP class within it. -Or. Make sure you are in the Flash perspective.

45 .Using Flash Builder 4. 3. and data type package) are automatically generated according to the PHP class. 4. service package.5 for PHP 2. The Service Operations dialog allows you to review all of the methods that are included in your PHP class. The service details (service name. Click Next to open the Service Operations dialog.

Your PHP service is now connected to your Flex project. Select your Flex project in the Package Explorer view and go to the Data/Services view. Select your Flex project in the Package Explorer view. The Select Service Type dialog opens. Click the Connect to Data/Service link. you can bind the data. and open the Data/Services view to see all the public methods included in the PHP service. 2. For more information see Binding. To perform PHP Introspection via the Data/Services view: 1. which can be opened manually by going to Window | Show View | Data/Services. 46 . Performing PHP Introspection via the Data/Services View This procedure describes how to perform PHP Introspection from the Data/Services view.5. 6. After performing PHP Introspection. Click Finish to complete the PHP Introspection.

Select PHP by Zend and click Next to open the Configure Zend Studio PHP Service dialog. 47 .5 for PHP 3.Using Flash Builder 4.

Click Browse. 7. Click Next to open the Service Operations dialog. 5. All the Service details are automatically configured according to the PHP Class you selected.4. The Select PHP File dialog opens. 48 . Select the PHP file you would like to use and click OK to go back to the Configure Zend Studio PHP Service dialog.

49 . Select your Flex project in the Package Explorer view. Your PHP service is now connected to your Flex project. and open the Data/Services view to see all the public methods included in the PHP service. 9. For more information see Binding.5 for PHP 8. Click Finish to complete the PHP Introspection. After performing PHP Introspection.Using Flash Builder 4. you can bind the data. The Service Operations dialog allows you to review all of the methods that are included in your PHP class. 10.

The next step is to bind the data together.5. you can launch your application. 50 .Binding Data After introspecting your PHP service. For more information see Building the client application or Data binding from the Using Adobe Flash Builder 4. Once you have completed data binding and developing your Flex and PHP code. Binding is the process of consuming the PHP methods into your Flex project by binding the data.5 for PHP allows you to bind your data in the following ways: using the drag and drop functionality (as shown below). This is achieved by tying your existing Flex components to an operation (a PHP method). Flash Builder 4. by selecting Bind to Data from the Right Click Menu of a Flex component in the Design view. your Flex project is now aware of the PHP service and the methods (operations) contained within it. by going to Data | Bind to Data after selecting code in the Source view or a component in the Design view. or by inserting it directly in the code.

Running your application in debug mode allows you to find and fix bugs in your Flex code and your PHP code. Flash Builder 4.5 for PHP allows you to launch your application in run mode or debug mode to run.5 for PHP Launching Your Application Flash Builder 4. all from within the same IDE. • •  Run a Flex/PHP Application Run a Flex Mobile/PHP Application Debug you application .Running your application run mode allows you to run and test your application. all from within the same IDE. diagnose.Running your application in debug mode allows you to find and fix bugs in your Flex code and your PHP code. test.5 for PHP allows you to:  Run your application . • • Debug a Flex/PHP Application Debug a Flex Mobile/PHP Application 51 . and fix problems in your code during development.Using Flash Builder 4.

This allows you to run and test your application during development. The 'Use Internal Web Browser' option does not apply to running and debugging applications. which is already located on the server. 52 . Before running your Flex/PHP application. you must introspect your PHP service and develop your Flex and PHP projects. The application opens in a browser. select the configuration you would like to use from the Launch Configuration Selection dialog and click OK. From the Right Click Menu of your Flex Project select Run As | Web (PHP) Application. See Managing Your Mobile (PHP) Run Configuration for information on editing options in the run configuration. 2. 3. To run a Flex/PHP application: 1. You must also have an existing database. The debug configuration is automatically configured according to your project settings. with your application's content located on the server. Applications are always run and debugged in an external web browser.Running Your Application Running a Flex/PHP Application This procedure describes how to run your Flex/PHP application. For more information see Web Browser Preferences in the Workbench User Guide. To change the default web browser to work with while running. go to Windows | Preferences | General | Web Browser. Note: If you have more than one configuration for Web (PHP) Application.

5 for PHP Managing Your Web (PHP) Run Configuration To manage your Web (PHP) run configuration: 1. Application file .go to Run | Run Configurations. Open the Main tab. A Run Configurations dialog will open. Project .Using Flash Builder 4. on the toolbar and select Run 3.The name of your Flex project. Double-click the Web (PHP) option to create a new debug configuration.Select the application file you would like to use from the 53 . 2. The dialog is made up of the following:    Name .Enter a name for the new configuration. Click the arrow next to the run button Configurations -Or. Click Browse to select from a list of an available list of projects.

 URL or path to launch . unmark the 'Use default' checkbox and modify the URL.The URL to be debugged will have been automatically created based on the file name and your server address. If the URL does not point to your debug target's location. See Running a Flex/PHP Application for information on running your application once the run configuration has been edited. or click Close to save your changes and run later. 54 . Click Apply to save your changes. To run now click Run.dropdown list. 4.

Using Flash Builder 4. select the configuration you would like to use from the Launch Configuration Selection dialog and click OK. To change the default web browser to work with while running. For more information see Web Browser Preferences in the Workbench User Guide.5 for PHP Running a Flex Mobile/PHP Application This procedure describes how to run your Flex Mobile/PHP application. Note: If you have more than one configuration for Mobile (PHP) Application. This allows you to run and test your application during development. 2. Before running your Flex Mobile/PHP application. You must also have an existing database with your application's content that is located on the server. you must introspect your PHP service and develop your Flex Mobile and PHP projects. See Managing Your Mobile (PHP) Run Configuration for information on editing options in the runconfiguration. Applications are always run and debugged in an external web browser. To run a Flex Mobile/PHP application: 1. 55 . 3. go to Windows | Preferences | General | Web Browser. From the Right Click Menu of your Flex Project select Run As | Mobile (PHP) Application. The 'Use Internal Web Browser' option does not apply to running and debugging applications. The application opens in a browser. The debug configuration opens with automatically configured settings according to your project.

Managing Your Mobile (PHP) Application Run Configuration To manage your Mobile (PHP) run configuration: 1. 2. Project . 3. Application file .go to Run | Run Configurations.The name of your Flex project. Click the arrow next to the run button on the toolbar and select Run Configurations -OR.Enter a name for the new configuration. A Run Configurations dialog will open. The dialog is made up of the following:    Name .Select the application file you would like to use from the 56 . Double-click the Mobile (PHP) option to create a new debug configuration and open the Main tab. Click Browse to select from a list of an available list of projects.

To run now click Run. and debugged via WiFi. When selecting this option. Select an available platform from the dropdown list. 4. meaning you don't need a mobile device for the debug process. Launch method .Mark this checkbox to clear the application's data each time you launch it. The server side of your application will be downloaded via USB to the device. you must debug on a device that is attached to your machine via USB.  'Clear application data on each launch' . you must have your device connected via USB and have access to WiFi.The method you would like to use to launch your application.Choose an available device to simulate from the dropdown list. • On device . This option allows you to debug your application on a simulated mobile operating system.5 for PHP dropdown list. For the client side of your application.The mobile platform on which you would like to debug your application.Using Flash Builder 4.   Target platform . or click Close to save your changes and run later. See Running a Flex Mobile/PHP Application for information on running your application once the run configuration has been edited. Click Apply to save your changes. 57 . Choose from the following options: • On desktop .This option allows you to debug your application on a mobile device.

Debugging Your Application
Debugging a Flex/PHP Application
This procedure describes how to debug your Flex/PHP application, which is already located on the server. This allows you to test your files and applications and detect errors in your code. The debugger allows you to control the execution of your program using a variety of options including setting breakpoints, stepping through your code, and inspecting your variables and parameters. Before debugging your Flex/PHP application, you must introspect your PHP service and develop your Flex and PHP projects. You must also have an existing database, with your application's content, located on the server.

To run a Flex/PHP application in debug mode: 1. Set breakpoints at the desired locations of your Flex project (in the MXML and/or ActionScript code), and/or PHP project. For more information see Setting Breakpoints or Adding and removing breakpoints in Using Adobe Flash Builder 4.5. Note: Breakpoints can be placed in the MXML/ActionScript code only, the PHP code only, or both. To debug both the server and client side simultaneously, place breakpoints in both projects. 2. To change the default web browser to work with while debugging, go to Windows | Preferences | General | Web Browser. For more information see Web Browser Preferences in the Workbench User Guide. The 'Use Internal Web Browser' option does not apply to running and debugging applications. Applications are always run and debugged in an external web browser. 3. From the Right Click Menu of your Flex Project select Debug As | Web (PHP) Application. The debug configuration is automatically configured according to your project settings. Note: If you have more than one configuration for Web (PHP) Application, select the configuration you would like to use from the Launch Configuration Selection dialog and click OK. 4. The application opens in a browser and breakpoints are hit. See Managing Your Web (PHP) Debug Configuration for information on editing options in the debug configuration. See Running and Analyzing Debugger Results or Managing the debugging session in the Debug view in Using Adobe Flash Builder 4.5for more information on the outcome of a debugging session.

58

Using Flash Builder 4.5 for PHP Managing Your Web (PHP) Debug Configuration

To manage your Web (PHP) debug configuration: 1. Click the arrow next to the debug button Configurations -Or- go to Run | Debug Configurations. A Debug Configurations dialog will open. 2. Double-click the Web (PHP) option to create a new debug configuration. Open the Main tab. on the toolbar and select Debug

3. The dialog is made up of the following:   Name - Enter a name for the new configuration. Project - The name of your Flex project. Click Browse to select from a list of an

59

available list of projects.   Application file - Select the application file you would like to use from the dropdown list. URL or path to launch - The URL to be debugged will have been automatically created based on the file name and your server address. If the URL does not point to your debug target's location, unmark the 'Use default' checkbox and modify the URL. 4. Open the Server tab.

5. The dialog is made up of the following:   Server Debugger - Select the Server Debugger to be used (by default this will be the Zend Debugger). Select your server from the PHP Server list - To edit your existing server click

60

Configure or edit your server by following the instructions in Adding a New Server to the List or Editing an Existing Server Configuration under the PHP Servers Preferences page.  Breakpoint . See Running a Flex/PHP Application in Debug Mode for information on debugging your application once the debug configuration has been edited. 6.Select whether the Debugger should stop at the first line of code by marking/unmarking the 'Break at First Line' checkbox.5 for PHP and your remote server. For more information on configuring the communication between Flash Builder 4.5for more information on the outcome of a debugging process. See Running and Analyzing Debugger Results or Managing the debugging session in the Debug view in the Using Adobe Flash Builder 4.5 for PHP can communicate with your server debugger. or click Close to save your changes and debug later.5 for PHP Configure or click New to open the PHP Server Creation Wizard and configure a new server. • To check whether your server connection is correctly configured. see Setting Up Remote Debugging. 61 . click Test Debugger. To debug now click Debug. and that Flash Builder 4. Click Yes if asked whether to open the Debug Perspective. Click Apply to save your changes. 7.Using Flash Builder 4.

62 . Note: Breakpoints can be placed in the MXML code only. To change the default web browser to work with while debugging. 4. The debugger allows you to control the execution of your program using a variety of options including setting breakpoints. For more information see Setting Breakpoints or Adding and removing breakpoints in the Using Adobe Flash Builder 4. stepping through your code. the PHP code only. 2. This allows you to test your files and applications and detect errors in your code. and inspecting your variables and parameters. select the configuration you would like to use from the Launch Configuration Selection dialog and click OK. To run a Flex Mobile/PHP application in debug mode: 1.5for more information on the outcome of a debugging process. or both. Note: If you have more than one configuration for Mobile (PHP) Application. For more information see Web Browser Preferences in the Workbench User Guide. go to Windows | Preferences | General | Web Browser. Set breakpoints at the desired locations of your Flex Mobile project (in the MXML and/or ActionScript code) and/or PHP Project. From the Right Click Menu of your Flex Project select Debug As | Mobile (PHP) Application. 3.Debugging a Flex Mobile/PHP Application This procedure describes how to debug your Flex Mobile/PHP application. To debug both the server and client side simultaneously. The application opens in a browser and breakpoints are hit. place breakpoints in both projects. You must also have an existing database with your application's content that is located on the server. See Running and Analyzing Debugger Results or Managing the debugging session in the Debug view in the Using Adobe Flash Builder 4. See Managing Your Web (PHP) Debug Configuration for information on editing options in the debug configuration. The debug configuration opens with automatically configured settings according to your project. you must introspect your PHP service and develop your Flex Mobile and PHP projects.5. Applications are always run and debugged in an external web browser. Before debugging your Flex Mobile/PHP application. The 'Use Internal Web Browser' option does not apply to running and debugging applications.

Click Browse to select from a list of an available list of projects.The mobile platform on which you would like to debug your application.The method you would like to use to launch your application.The name of your Flex project. A Debug Configurations dialog will open. Click the arrow next to the debug button on the toolbar and select Debug Configurations -OR. The dialog is made up of the following:      Name . Double-click the Mobile (PHP) option to create a new debug configuration and open the Main tab. Target platform . Select an available platform from the dropdown list. 2. Project . Launch method .Enter a name for the new configuration. Application file . 63 .go to Run | Debug Configurations.5 for PHP Managing Your Mobile (PHP) Application Debug Configuration To manage your Mobile (PHP) debug configuration: 1.Select the application file you would like to use from the dropdown list. 2.Using Flash Builder 4.

For the client side of your application. you can mark/unmark the 'Install the application on the device over USB' option.Mark this checkbox to clear the application's data each time you launch it. meaning you don't need a mobile device for the debug process. • On device . select whether to debug on a device that is attached to your machine via USB. you must have your device connected via USB and have access to WiFi. or via WiFi. The server side of your application will be downloaded via USB to the device. When selecting this option. 64 . o  If you are using the Debug via WiFi option.This option allows you to debug your application on a mobile device. Open the Server tab. 'Clear application data on each launch' .Choose from the following options: • On desktop . and debugged via WiFi.Choose an available device to simulate from the dropdown list. 3. This option allows you to debug your application on an simulated mobile operating system.

Select whether the Debugger should stop at the first line of code by marking/unmarking the 'Break at First Line' checkbox. Click Yes if asked whether to open the Debug Perspective. 6. • To check whether your server connection is correctly configured.Using Flash Builder 4. or click Close to save your changes and debug later. To debug now click Debug. see Setting Up Remote Debugging. click Test Debugger.5 for PHP 4.Select your server from the PHP Server list. Configure or edit your server by following the instructions in Adding a New Server to the List or Editing an Existing Server Configuration under the PHP Servers Preferences page.Select the Server Debugger to be used (by default this will be the Zend Debugger). 5. To edit your existing server click Configure or click New to open the PHP Server Creation Wizard and configure a new server. and that Flash Builder 4. PHP Server .  Breakpoint . The dialog is made up of the following:   Server Debugger . See Running and Analyzing Debugger Results or Managing the debugging session in the Debug view in the Using Adobe Flash Builder 4.5for more information on the outcome of a debugging process. See Running a Flex Mobile/PHP Application in Debug Mode for information on debugging your application once the debug configuration has been edited. Click Apply to save your changes.5 for PHP can communicate with your server debugger. For more information on configuring the communication between Flash Builder 4. 65 .5 for PHP and your remote server.

right-click a Flex or Flex Mobile project in the Package Explorer view and select Properties | Flex/PHP Support -or. 66 . the PHP project you define.select the project and from the menu bar go to Project | Properties | Flex/PHP Support. and interact with.PHP Support Properties About Flex/PHP Support allows your Flex project to be aware of. If you create a Flex/PHP or Flex Mobile/PHP project using the corresponding new project wizard. This will create the connection that combines your Flex or Flex Mobile and PHP projects to one another. To access the PHP Support Properties page. PHP Support is enabled by default. PHP Support must be enabled before you can work with your Flex/PHP or Flex Mobile/PHP Application.

5 for PHP The Flex/PHP Support Properties page is made up of the following:   Enable/Disable PHP Support checkbox . Output Folder . the gateway location must always be within the attached PHP project directory .  PHP Project Name .The location of your gateway file. All other options in this page are available only when PHP Support is enabled. 67 .The PHP project associated with your Flex project.Mark this checkbox to enable PHP support. for example “C:\Program Files\Zend\Apache2\htdocs”.Using Flash Builder 4. Server options: • •  Web Root . Root URL . and for a mobile application the default is the "bin-debug" folder of your Flex project.The web server's directory.The URL of your server. From the Flex/PHP Support Properties page you can enable and disable PHP Support.  Gateway Location Folder . the gateway file is located under the "public" folder of your PHP project. For a web application they are stored by default in the “public/bin-debug” folder of your PHP project. your root URL can be “http://localhost”.The directory where compiled output files are stored. By default. Although you can change the default location. For example. For more information see The Gateway Script.

68 . all classes stored in the "services" and "library" folders are dynamically loaded by the Autoloader. Changing the file's location is available in the PHP Support Properties page.The Gateway Script Flash Builder 4. Flex first sends a handshake http request to the gateway. Flex sends second http request including an AMF request for data from the PHP service (5). The gateway. If PHP namespace prefixes are used properly. The gateway. After receiving an acknowledgment (4).ini file. which is able to translate between Flex/ActionScript and PHP. as well as the Zend Framework location to the PHP Include Path. For more information regarding dynamic class loading and PHP namespaces see Zend Framework Autoloader. and the Zend Framework Autoloader which enables dynamic class loading. When data from a PHP service is required in your UI (1). The gateway script initializes the Zend AMF Server. The gateway is responsible for converting objects and translating the results from PHP methods into native ActionScript objects used in the Flex User Interface.php file on the PHP server (2).php file is located under the "public" folder of your PHP project. located under the "public" folder of your PHP project. By default it adds the "services" and "library" folders of your PHP project.5 for PHP allows you to create combined Flex and PHP applications.php script reads configuration variables from the amf_config.

The AMF request is translated into PHP object format (6).Using Flash Builder 4.5 for PHP On the server side. 69 . the request passes through the gateway.php file where the Zend AMF Server is initialized. and then passed to your service where the requested data is fetched (7). where the response appears in the UI (10). The service's response is translated back by the Zend AMF Server into AMF data (9) before being sent back to the Flex.