简体   繁体   English

partial和addChild有什么区别?

[英]what is the difference of partial and addChild?

Both are easy to use, both give the same output. 两者都易于使用,都提供相同的输出。 So what is the difference? 那么区别是什么呢? Are there any advantages to use one or the other? 使用一个或另一个有什么好处吗? Is there any advantage in performance, security or what ever? 性能,安全性或其他方面是否有优势?

Which one would I use better if I want to manipulate view during runtime? 如果我想在运行时操纵视图,哪个会更好?

If we talk on zend-view, both using render's view method then calls rendrChild method recursively. 如果我们谈论zend-view,则两者都使用render的view方法,然后递归调用rendrChild方法。 So we can say there's not performance difference. 因此,我们可以说没有性能差异。

Here's the zend-view's render method and here partial helper using it 这是zend-view的render方法这里是使用它的部分帮助器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM