index.mxml
myApp.php
<?php
class myApp {
public function __construct() {
}
public function getData() {
$r[] = array("Date"=>"21", "en1"=>"2000", "en2"=>"1500", "en3"=>"450");
$r[] = array("Date"=>"22", "en1"=>"2100", "en2"=>"2500", "en3"=>"1450");
$r[] = array("Date"=>"23", "en1"=>"2200", "en2"=>"3500", "en3"=>"2450");
$r[] = array("Date"=>"24", "en1"=>"2300", "en2"=>"4500", "en3"=>"450");
$n[] = array("en"=>"en1", "cn"=>"名称1");
$n[] = array("en"=>"en2", "cn"=>"名称2");
$n[] = array("en"=>"en3", "cn"=>"名称3");
$rr['lines'] = $n;
$rr['datas'] = $r;
return $rr;
}
}
?>
flash builder 调用PHP 生成 project.fml
<?xml version="1.0" encoding="UTF-8"?>
<model xmlns="http://ns.adobe.com/Fiber/1.0">
<annotation name="ActionScriptGeneration">
<item name="FullyQualifyReferences">true</item>
</annotation>
<service name="MyApp">
<annotation name="ActionScriptGeneration">
<item name="Source">myApp</item>
<item name="ServiceType">RemoteObject</item>
<item name="Package">services.myapp</item>
<item name="Endpoint">gateway.php</item>
<item name="Destination">myApp</item>
</annotation>
<annotation name="ServiceTypeGroup">
<item name="ServiceBackendType">PHP</item>
</annotation>
<annotation name="ServiceConfig">
<item name="PHP_RELATIVE_LOCATION">amfphp/services/myApp.php</item>
<item name="PHP_SERVER_ROOT">D:/flex/webtest</item>
<item name="DEFAULT_ENTITY_PACKAGE">valueObjects</item>
<item name="PHP_SERVICES_FOLDER">D:/flex/webtest/amfphp/services</item>
<item name="PHP_LOCATION">D:/flex/webtest/amfphp/services/myApp.php</item>
<item name="LINKED_FILE">myApp.php</item>
<item name="PHP_SERVER_ROOT_URL">http://www.a.com/</item>
<item name="ABSOLUTE_ENDPOINT">http://www.a.com/amfphp/gateway.php</item>
<item name="PHP_CLASS_NAME">myApp</item>
</annotation>
<function name="getData" return-type="opaque">
<annotation name="analyze group">
<item name="analyzed">false</item>
</annotation>
<annotation name="original signature">
<item name="returnType">opaque</item>
</annotation>
</function>
<function name="getLines" return-type="opaque">
<annotation name="analyze group">
<item name="analyzed">false</item>
</annotation>
<annotation name="original signature">
<item name="returnType">opaque</item>
</annotation>
</function>
</service>
</model>
flash builder 调用PHP 生成 as 文件省略了!