Reputation: 155
I am new with qcodo framework, trying to debug some code.
$variable=ClassName::FunctionName($this->obj);
is there any method to find the path of the class file 'ClassName' which works here? i want to check is the correct class file is working. any way to find this? thanks in advance.
Upvotes: 0
Views: 997
Reputation: 155
From my research we can find the path of class which is working by,
$abstractClass = new ReflectionClass('ClassName');
echo dirname($abstractClass->getFileName());
and if we want to check the content of the class file in this path use the code below,
$file = dirname($abstractClass->getFileName()). "/ClassName.php";
$contents = file($file);
$string = implode($contents);
$string = str_replace('<?php','"',$string);
$string = str_replace('?>','"',$string);
echo "<pre>";
echo $string;
echo "</pre>";
Upvotes: 2