0
wamp serverとPropelを使用しています。Propelを使用してサービスを作成しましたが、サービスから返されたデータを接続するときに戻り値の型を認識できません。flexのpropel戻り型の設定
これは私が自動検出の戻り値の型を選択したときはまだ、それはエラーに
'teacher' cannot be set to the data type "StdClass" because it has no properties.
を与え、私はデータグリッド内teacersの情報を表示するためにwanto
<?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;
}
}
?>
を書いたPHPのコードです
propelによって返された教師行のプロパティをflexに知らせるにはどうすればよいですか?
PHPコードのみを提供するように見えるPHPタグb/cを追加しました。個人的には、プロペラが何であるか分かりません。 – JeffryHouser