You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all.
I try to refactor some chaining methods but didn't find a way. I see the following article to traverse and find a specific node.
For examples, I want to refactor : Core::app()->auth->getOption('my_option');
in App::auth()->getOption('my_option');
or Core::app()->meta->getRecordSet($post);
in App::meta()->getRecordSet($post); auth and meta were property and becomes methods. Core:app becomes App
I can identify the static call in my code but didin't find a way to retrieve sub node for property or methods.
Any help appreciates. Thanks in advance
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all.
I try to refactor some chaining methods but didn't find a way. I see the following article to traverse and find a specific node.
For examples, I want to refactor :
Core::app()->auth->getOption('my_option');
in
App::auth()->getOption('my_option');
or
Core::app()->meta->getRecordSet($post);
in
App::meta()->getRecordSet($post);
auth and meta were property and becomes methods. Core:app becomes App
I can identify the static call in my code but didin't find a way to retrieve sub node for property or methods.
Any help appreciates. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions