0
我使用wamp服務器和Propel.I使用Propel編寫了我的服務,但是當我想連接從服務返回的數據時Flex無法識別返回類型。爲flex配置propel返回類型
這是PHP代碼,我寫
<?php
// Include the main Propel script
require_once 'C:/wamp/propel/runtime/lib/Propel.php';
// Initialize Propel with the runtime configuration
Propel::init("C:/wamp/www/school/build/conf/school-conf.php");
// Add the generated 'classes' directory to the include path
set_include_path("C:/wamp/www/school/build/classes" . PATH_SEPARATOR . get_include_path());
class TeacherService {
function getTeachers()
{
$allTeachers=TeacherQuery::create()->find();
$teachers=array();
foreach($allTeachers as $teacher1)
{
array_push($teachers, $teacher1);
}
return $teachers;
}
}
?>
我wanto又顯示teacers的DataGrid中的信息時,我選擇自動檢測返回類型它給人的錯誤
'teacher' cannot be set to the data type "StdClass" because it has no properties.
如何讓flex知道由propel返回的教師行的屬性?
我添加了PHP標籤b/c,您似乎只提供PHP代碼。我個人不知道推動是什麼。 – JeffryHouser