Smarty 3如何与Zend Framework 2一起使用? [英] How can Smarty 3 be Used with Zend Framework 2?

查看:177
本文介绍了Smarty 3如何与Zend Framework 2一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很久以前就使用过PHP5,目前我正在尝试更新我的知识并用Zend Framework 2和Smarty 3的知识来增强它的可能项目。

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.

我目前正试图弄清楚如何使用Smarty 3作为Zend Framework 2的替代/补充。

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

我可以通过Google在这个主题上找到的一切:

Everything I can find through Google on this topic either:


  1. 已过时(例如Zend Framework 1)

  2. 假设我对两者都有更亲密的工作知识Zend和Smarty比我实际做的更多。

有人向我解释,好像我 9 ,使用Zend Skeleton Application作为我的起点:

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


  1. 在什么目录/文件夹中(使用完全合格的路径),我应该解压缩Smarty-3.1.12软件包?

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

我需要创建哪些类,他们究竟需要什么类包含,以及它们应存放在何处?

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

什么f需要修改iles,以及如何使Smarty可以在我的模块中查看?

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

参考上面创建的类,怎么能/应该从AZ使用这些(例如包括在适当的类中,分配值,创建输出)?

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)?


推荐答案

那里是一个非常好的模块 SmartyModule

There is quite good module SmartyModule

绝对使用composer来安装它,它让您的生活更轻松: - )

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

以及示例应用程序

这篇关于Smarty 3如何与Zend Framework 2一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆