Enjekte denetleyicisi Zend Framework params alıyorum Sorunu

1 Cevap php

Ben bir düzen 'profil'

<div>
    <div> $this->action(action1, controller1, module1)<div>
    <div> $this->layout()->content </div>
    <div> $this->action(someotheraction, soController,soModule );
</div

And the problem starts when I want to get the $request->Params() from the action1 , controller1 module1 , it is empty. I looked at the code of a helper Action , it does accept as a 4th parameter Params, but then I will have to set it somewhere in the layout - which is not good. Basically what are the recommendations of guru people that are pretty professional with zend Framework. Maybe I should do some work around or should change the concept of how I am injecting additional Controller(module) actions

1 Cevap

Eğer Görünümünde current Request nesnesi almak istiyorsanız, size denetleyicisi View enjekte yoluyla veya Ön Kontrol elde edebilirsiniz ya

$request = Zend_Controller_Front::getInstance()->getRequest();

Yukarıdaki Eylem yardımcı o kendisi alır nasıl.

Gönderilmeden önce Eylem Yardımcısı'nın eylem yöntemi set $ params dahil, herhangi bir argüman, geçerli Request nesnesine ayarlanır. İstek yavaş ve why the Action Helper is generally avoided, hangi tekrar tüm gönderme döngüsü boyunca devam edecek. Eylem Yardımcı (çıkış değil) Tepki vücut dönecektir.

Bu olsa soru cevaplar ise emin değilim.