如何在eclipse(php)中生成getter和setter [英] How to generate getter and setter in eclipse (php)

查看:143
本文介绍了如何在eclipse(php)中生成getter和setter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,我使用eclipse来处理Java,所以当我想使用PHP时,我也使用eclipse。



但是我不知道如何为类变量生成getter和setter。当我点击右键,我没有菜单 Source - >生成Getter / Setter



如何在eclipse中使用php?



谢谢。

解决方案

Zend Studio基于Eclipse,也提供了这个功能。然而,它不是免费的,但如果您不介意为IDE支付费用,这可能是一个选项。



如果您正在使用PHP,您可能会找到PDT和Zend Studio之间的比较有用:



http://www.zend.com/en/products/studio/comparison


Usually, I use eclipse to work with Java, so when I want to work with PHP, I use eclipse too.

But I don't know how to generate getter and setter for class variables. When I do a right click, I don't have the menu Source -> Generate Getter / Setter.

How to do this with php in eclipse ?

Thanks.

解决方案

Zend Studio, which is based on Eclipse, provides this feature as well. It is not free, however, but if you don't mind paying for an IDE, this might be an option.

If you're currently using PHP, you might find this comparison between PDT and Zend Studio useful:

http://www.zend.com/en/products/studio/comparison

这篇关于如何在eclipse(php)中生成getter和setter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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