Open newjie opened 9 years ago
Hello, Sure, this is a point that can really help, I use the implemention of the Reflection process (native PHP 5), because it is not provided by jDump (... for now ;))
There it is how you can solve it :
$ref = new ReflectionClass('JModuleHelper');
dump($ref->getFileName(), 'Reflection Class path for '.$ref->getName());
It will execute the Reflection process on the name of the class in parameter (JModuleHelper). You juste have to 'dump' the getFileName() method on the resulted object and it's done !
Hope it helps ;)
I am a beginner with PHP and Joomla Core development. This great extension helps me a lot during my learning. A very frequent situation when I try to understand some code is, there is a method of a class being invoked in a line and I want to look into the definition of the class but have no idea where it is. Before j!dump, I had to download the extension in question and in-text search the class, which takes a lot of time. I believe this simple goal can be achieved by using j!dump, but I don't know how. It is like follows:
This line is found in a module's PHP file, I'd like to know where this
modPimediaplayerHelper
is defined, I trieddump(modPimediaplayerHelper)
anddump(modPimediaplayerHelper::getStudy)
, both of them don't work, so what should I do?By the way, when I try to
dump($params)
, it returns a object without meaningful properties but only methods, which provokes me to look into how this $params object is defined also, how do I use j!dump to track it?