partial和addChild有什么区别?

时间:2018-01-08 18:00:41

标签: zend-framework zend-framework3 zend-view

两者都易于使用,两者都提供相同的输出。 那么区别是什么呢?使用其中一个有什么好处吗?在性能,安全方面还是有什么优势?

如果我想在运行时操作视图,我会更好地使用哪一个?

1 个答案:

答案 0 :(得分:1)

如果我们谈论zend-view,两者都使用render的view方法,然后递归调用rendrChild方法。所以我们可以说没有性能差异。

Here's the zend-view's render methodhere partial helper using it

相关问题