Skip to content

Added 'debugInfo' flag to switch output between Magic Method '__debugInfo()' or Default Class Structure #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jcmarchi
Copy link
Contributor

@jcmarchi jcmarchi commented May 1, 2019

I use this debug tool quite often and, in some cases, I am required to visualize the Class structure as it is defined instead of the output of the Magic Method __debugInfo() (when it is present).

Due to the fact this fantastic product is meant for debugging purposes, I felt a little orphan when I realized the function evolved to arbitrarily display the output of the __debugInfo() without any option for me to switch it back to display the Class structure as it is defined.

With the addition of the flag "debugInfo" (default to true), now it possible to use the same tool for both purposes, easily switching from one output to another simply by changing the configuration on the fly:

  • Default Output (using __debugInfo() output, if present): ref::config('debugInfo', true);
  • Class structure output (bypassing __debugInfo() output, if present): ref::config('debugInfo', false);

I am sure many people will appreciate such additional capacity. I hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant