古いバージョンの Zend Framework から最新バージョン (1.11) にアップグレードしようとしています。
アクセスできないFlexアプリにいくつかのArrayCollectionを送信する必要があります。ZF の以前のバージョンには、新しいバージョンにはZend_Amf_Value_Messaging_ArrayCollection
ないsource
属性があります。
Zend_Amf_Value_Messaging_ArrayCollection
そのプロパティを持つようにクラスを編集しようとしましsource
たが、ZF がオブジェクトを Flex アプリに送信しないようです (デバッグ プロキシ経由で気づいた)。ArrayCollection にはまだ正しいキーがあります (AFAIK、0 -> 3 から) が、値はNULL
.
これは小さなテストファイルからのものです:
$c = new RoomCategoryVO();
$c->name = 'root';
$c->childCategories = new Zend_Amf_Value_Messaging_ArrayCollection();
$cc1 = new RoomCategoryVO();
$cc1->sortPriority = 2;
$cc1->name = $this->xml->roomService->windows;
$cc1->parentCategory = $c;
$cc1->childItems = new Zend_Amf_Value_Messaging_ArrayCollection();
$re11 = new ElementVO();
$re11->id = "simpleWindow";
$re11->name = $this->xml->roomService->window;
$re11->type = 'SIMPLE_WINDOW';
$re11->icon = 'assets/runtime/images/schemeIcons/simpleWindow.png';
//$cc1->childItems->source[] = $re11;
$cc1->childItems[] = $re11;
//$c->childCategories->source[] = $cc1;
$c->childCategories->append($cc1);
コメントには、ZendAMF の「古い」方法が表示され、その下に新しい方法が表示されます。
source
古いバージョンの ZF に戻らずに、ZendAMF にプロパティを再び使用させる方法はありますか?