0

古いバージョンの 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 にプロパティを再び使用させる方法はありますか?

4

1 に答える 1

0

私たちはついにZendAMFの使用に落ち着きましたZend_Amf_Value_Messaging_ArrayCollectionが、以前のバージョンのは次のとおりです。

class Zend_Amf_Value_Messaging_ArrayCollection
{
    public $source;
}

これにより、引き続きsourceプロパティを使用できます。

于 2011-10-05T06:28:00.037 に答える