问题
I've recently installed ZF, and haven't had any issues using it, however when I'm working in Netbeans, I'd like for it to recognize and suggest ZF components. For example, when I type:
$config = new Zend_
I want it to auto-complete or suggest:
Zend_Registry
Or when I try to use:
Zend_Registry::getInstance();
I'd like for Netbeans to auto-suggest getInstance and recognize documentation for it. I figure it has something to do with including the library inside the application, but I'm not sure where exactly to set this? I have the library set for include_path inside php.ini, and the components work as expected in the browser, so no issues there.
回答1:
In Netbeans menu go Tools > Options > PHP
under General
tab Global Include Path
section click Add Folder
. Add Zend
folder from your library, confirm everything. Let Netbeans finish scanning and you're done.
来源:https://stackoverflow.com/questions/10096728/get-netbeans-to-auto-suggest-zend-framework-components