php - get full class name from short class name -


somewhere in codebase there file abc.php class named abc:

<?php namespace x\y\z;  class abc {     // ... } 

in different script, variable short class name (without namespace):

$classname = "abc"; 

i need reflection of class, code:

  $r = new \reflectionclass($classname); //error: class abc not exist in... 

is not working since full class name "x\y\z\abc" required.

building object not working same reason:

$obj = new $classname(); // error: class 'abc' not found in... 

how find full class name short 1 ?

any suggestions welcome.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -