PHP Code Explorer is one of PHP Tools available in NuSphere's PHP IDE designed to help the PHP developer to navigate through and explore PHP or JavaScript Code. PHP Code Explorer main goal is to provide an easy navigation through all PHP Files in the current Project. You can also use PHP Code Navigator to navigate through PHP code in any open PHP file. In this tutorial you will learn how to use PHP Code Explorer tab in PhpED.
PHP Code Explorer tab
PHP Code Explorer tab provides the powerful ability to view and search functions and classes for any files of your project. In PHP mode the tab displays a list of PHP classes, functions, constants and variables present in the current project. Code Explorer also supports JavaScript - please follow this link to learn more about JS code explorer.
3 different modes are available:
- Class View. In this mode PHP objects are grouped by types (constants, variables, classes and functions). This provides the general overview of your project.
- Project list. Lists all php files in the current project with their contents grouped by type. If you click on a file, an explorer-style view of the classes and functions available from that file will open, including the expected arguments for each.
- Project Tree. Represents the project structure with folders, files and file contents grouped by type. If you click on a file, an explorer-style view of the classes and functions available from that file will open, including the expected arguments for each.
|
|
|
For example, the picture below displays PHP Code Explorer in Project List View mode:
How to use PHP Code Explorer tab
Use the context menu (right-click on the PHP Code Explorer area opens it) to switch between view modes.
PHP Code Explorer displays tooltips containing function arguments, files and lines where the object is first used.
For constants and variables, the number in brackets next to their name shows the number of modules using this object (if there is more than 1 module).
|
|
|
How to perform search in PHP Code Explorer
PHP Code Explorer allows you to search through the contents of the project to find specific objects (classes, constants, functions and variables).
Type the object name (or part of it) into the search field and click the binocular icon or hit Enter
|
|
|
Double-click on the constant / function / variable /class name in PHP Code explorer opens the selected file and places the cursor on the line containing it (for constants and variables it will be first line, where they appear. If the variable appears in multiple files, 1 double-click opens 1 file, starting with the first in the list). Right-click on the file / function name brings up the contextual menu with the following options:
- Go to definition. Select it to open file / to move the cursor to the line containing the selected function.
- Find next. Jumps to the next object relevant to the search. Active when the search field is not empty.
- Find previous. Jumps to the previous search result. Active when the search field is not empty.
- Sort by name. Select it to sort items in the Code Explorer window by name.
- Sort by definition. Select it to sort items in the Code Explorer window by definition.
- Project list. Select it to display the tree of all the PHP files and their code structures containing in the active project.
- Project tree. Select it to display the active project structure tree (identical to that in the Workspace tab) with all the PHP files and their code structures.
- Class View. Select it to display constants, variables, classes and functions sorted by type
Note: PHP files are designated with the extensions specified in the Associations tab.
You can see how PHP Code Navigator and PHP Code Explorer can help you code PHP Faster if you Download a free trial of NuSphere's PHP IDE today!
|