How can Smarty 3 be Used with Zend Framework 2?

2019-04-28 18:42发布

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条回答
smile是对你的礼貌
2楼-- · 2019-04-28 19:48

There is quite good module SmartyModule

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

And sample application

查看更多
登录 后发表回答