Make Visual Studio Code recognize the classes in the Zend Framework Library - zend-framework

When I open the IndexController with Visual Studio Code it doesn't find any of the classes in the Zend Framework Library which are located in the library/Zend folder.
Whenever I click on Zend_Controller_Action and press CTRL and SPACE, I expect VSC to show me the suggestions, but it doesn't.
class IndexController extends Zend_Controller_Action {[...]}
Intelliphense or whatever that plugin is called is installed already.
It's working in netbeans though, whilst also failing in Zend Studio...PhpStorm...
So I guess there must be some setting, right?

For what it's worth, I just had the same problem, on a system that uses a fairly old version of Zend, using a VS Code with the Inteliphense extension installed, and someone helped me solve it like so:
in VS Code, open Settings
search for "Intelephense Environment include paths"
press "Add Item" to add the following two paths :
/usr/share/php7.2-common/ZendFramework-1.12.20/library/
/usr/share/php7.2-common/

Related

View Class Hierachy in VS Code

Does VS Code inherently come with any tool other than Ctrl+Shift+O to view the entire class hierarchy within a project? Think similar to a Visual Studio solution or Eclipse project.
I've looked around the VS Code extension marketplace and have not seen one. It would be very useful to see this kind of tree for a TypeScript based project instead of seeing just the imports from a particular .ts file
If anyone knows of one, please share!
If you're in the Explorer, the built-in OUTLINE view does exactly this. I am apparently not paying attention.

URL scheme to make Eclipse open the source code of a class

Eclipse market have these links which can be dragged into Eclipse to install packages. I am wondering is there something similar to open the source of a class.
I want to use them in my coding notes so I can quickly jump to the source code.

difference between MultiSourceEditor and MultiPageEditorPart

I found the source code for the Plugin Manifest Editor, from Eclipse, and noticed that it uses another class as model. The MultiSourceEditor.
In my editor I´m using MultiPageEditorPart. And I need to open 2 source files here with it.
Basically, what are the differences between them? Maybe I should switch to this one?
Thanks a lot.
org.eclipse.pde.internal.ui.editor.MultiSourceEditor is an internal editor used by the Plugin Development Environment. It extends FormEditor which itself is based on MultiPageEditorPart. The editor is just a specialized multi-page editor for PDE.
You must not use any internal classes, they are subject to change without notice - Eclipse API Rules of Engagement. You can, of course, look at the source code to see what it does.

Get Netbeans to Auto-suggest Zend Framework components

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.
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.

Mongo autocomplete in Zend Studio

Does anyone know how to get auto complete for MongoDB to work in Zend Studio 8. What would actually be an ideal solution is how to add autocomplete for any binary library not in the form of php files.
I.E. I know how to add a folder of php classes to the include path to get autocompletion, but mongo is a php plugin and not a collection of class files. Possible there is a way to generate php files for Zend to use.
Any help would be appreciated.
At first you go here to see that there's a guy who has written a "reflector" of php classes which dumps the contents of a class to a file with phpdoc comments. Also there's a link to sources where mongo.php is present as an example.
You can put that mongo.php into a folder and then in Zend Studio right-click a project, select "properties", go into "php include path -> libraries", click "add external source folder" and point to the folder with the mongo.php.
Voila, zend studio has autocompleting enabled now for MongoDB classes!
Don't know whether that mongo.php is up to date, but I'm using it without a problem.
I've put its code here just for a case.
Probably a bit late answer, but it would be better than nothing ;)