0
我們正在嘗試從舊版本的Zend Framework升級到最新版本(1.11)。ZendAMF 1.11和缺失的源代碼
我們必須將一些ArrayCollections發送到我無法訪問的Flex-app。 ZF Zend_Amf_Value_Messaging_ArrayCollection
的先前版本具有source
屬性,而新版本不具有這些屬性。
我已經嘗試編輯Zend_Amf_Value_Messaging_ArrayCollection
類來擁有source
屬性,但似乎ZF不會將對象發送到Flex-app(我注意到通過調試代理)。 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的「老」的方式,它們下面的新途徑。
有沒有什麼辦法讓ZendAMF再次使用source
屬性而不回到舊版本的ZF?