Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm - print out methods and variables in class files

Tags:

phpstorm

I have about 10 classes all in individual files. I have not looked at them for ages. Is there a PhpStorm function that would allow me to list the methods and attributes listed in the individual files?

EDIT: The solution is to highlight all the classes you are interested in and then use the diagram tool. See my answer below.

like image 561
BeNice Avatar asked Dec 27 '15 09:12

BeNice


3 Answers

You can use PHPStorm's Structure View:

Use the Structure pop-up window or the Structure tool window to quickly jump to the desired member of a file in the editor. The Structure views provide quick navigation for all supported file types.

Structure View

You can also use the Structure tool window (Alt+7). This view is flexibly configurable and useful for many tasks, apart from navigation. However, the File Structure pop-up window is the easiest way for quick navigation.

Source https://www.jetbrains.com/phpstorm/help/navigating-with-structure-views.html

like image 142
Gordon Avatar answered Nov 15 '22 18:11

Gordon


Finally discovered what I was looking for.

Highlight all the classes you are interested in in Project view. Right click Diagrams->Show Diagrams (or Ctrl+Alt+Shift+U).

Arrange diagrams on screen.

Select light colored background (Ctrl Backtick) select 5: Look and Feel (not theme).

Right click on diagram and do a print preview. Select Graph for full size. Click OK and make page adjustments. I printed out my 8 classes on an 11 x 17 sheet and I am in "help-my-bad-memory-heaven". Just what I was looking for.

Hope that was useful.enter image description here

like image 40
BeNice Avatar answered Nov 15 '22 19:11

BeNice


You can use a PHPDoc for that. Generate API doc of your comment doc and you have a offline reference very useful and like your code.

Otherwise, you can attribute a shortcut for launch or focus on the structure view PHPStorm tools.

like image 42
darkomen Avatar answered Nov 15 '22 19:11

darkomen