在 Eclipse PDT/Zend Studio 中自动完成 MVC 视图变量

发布于 2024-08-28 11:48:18 字数 159 浏览 2 评论 0原文

当使用 Zend Studio 为 MVC 框架编写视图时,有没有办法让这些变量自动完成,也许使用 PHPdoc?

例如,我在名为 $cart 的视图中设置一个变量,它是我的 ShoppingCart 类的实例。当我输入“$cart->”时,我希望 IDE 弹出并显示所有对象属性。

When using Zend Studio to write views for a MVC framework, is there any way of having those variables autocomplete, perhaps using PHPdoc?

For example, I set a variable in a view called $cart which is an instance of my ShoppingCart class. When I type "$cart->", I'd like the IDE to pop up with all of the objects properties.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枯寂 2024-09-04 11:48:19

在 Netbeans 中可以执行以下操作:

/* @var $var Class */

不确定它是否在 Eclipse 中工作。

in Netbeans it is possible to do the following:

/* @var $var Class */

not sure if it works in eclipse.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文