Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
777 views
in Technique[技术] by (71.8m points)

php - How to set up Netbeans autocomplete with Zend Framework?

Netbeans is giving me poor autocomplete results when working with Zend Framework.

Is there a way that I could work with Netbeans and get a very good level of autocompletion, or am I better off switching to a framework that Netbeans perhaps provides a better autocomplete results for, such as CodeIgniter?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

netbeans uses phpDocumentor to provide inline docs for its code completion. In order to do this it needs access to the code files where the doc blocks are. In your case the Zend Framework code.

When you set up your project you need to tell netbeans where these files are located. Each project in netbeans has an include path folder like this

netbeans screen shot

If you right click on this and click 'properties' you will be taken to a dialogue that allows you to add code from outside your project to the include path.

netbeans screen shot

Add the library/Zend folder to this dialogue so that you get something like this:-

netbeans screen shot

This should allow netbeans to give you code completion for ZF. The finished result:-

Code completion screen shot

Check the netbeans documentation for more information.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...