How can Smarty 3 be Used with Zend Framework 2?

旧街凉风 提交于 2019-12-07 01:58:44

问题


I used PHP5 a long time ago and am presently trying to refresh my knowledge and augment it with knowledge of Zend Framework 2 and Smarty 3 for a possible project.

I'm currently trying to figure out how to use Smarty 3 as a replacement/supplement to Zend Framework 2.

Everything I can find through Google on this topic either:

  1. Is outdated (e.g. Zend Framework 1)
  2. Assumes I have a more intimate working knowledge about both Zend and Smarty than I actually do.

Can someone please explain to me as though I were 9, using the Zend Skeleton Application as my starting point:

  1. In what directory/folder (using a fully qualified path), I should unzip the Smarty-3.1.12 package?

  2. What class(es) I need to create, what exactly do they need to contain, and where should they be stored?

  3. What files need to be modified, and how, to make Smarty available for viewing within my module(s)?

  4. With reference to the above created classes, how can/should these be used from A-Z (e.g. including within appropriate classes, assigning values, creating outputs)?


回答1:


There is quite good module SmartyModule

Definitely use composer to install it, it makes your life much easier :-)

And sample application



来源:https://stackoverflow.com/questions/13344951/how-can-smarty-3-be-used-with-zend-framework-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!