zend 有图像查看助手吗
我可以在视图中输入图像的 html
<img src="">
,但想知道 zend 是否有像 url 那样的图像视图助手。
I could type the html for an image in my view
<img src="">
but was wondering if zend has an image view helper like it has with urls.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,没有。它可能永远不会有,因为编写像这样的助手是微不足道的。
但是,对于这种情况,有
Zend_View_Helper_HtmlElement
,应该对其进行子类化以实现 HTML 标记所需的功能。您应该自己编写,或使用以下人员共享的 img 帮助程序之一PHP 社区。
No it doesn't. And it probably will never have, because it's trivial to write helpers like this one.
However, for such cases there is
Zend_View_Helper_HtmlElement
, which should be subclassed to implement needed functionality for HTML tags.You should write your own, or use one of the img helpers shared by php community.
不,事实并非如此。不过它有 TinySrc 视图助手,所以如果你真的想要的话,你可以使用它。还有定制的图像助手,例如 Zend Framework 的图像视图助手
No it does not. It has TinySrc view helper though, so you could use it if you really want. There are also custom made image helpers, e.g. Image view helper for Zend Framework
不。Zend Framework 不包含此帮助程序。但您始终可以自己编写此帮助程序。这很容易。自定义图像助手示例: http: //blog.amnuts.com/2007/10/03/simple-image-view-helper-for-zend-framework/
No. Zend Framework doesn't contain this helper. But always you can write this helpers yourself. It is easy. Example of customize image helper: http://blog.amnuts.com/2007/10/03/simple-image-view-helper-for-zend-framework/