Afficher un message
Vieux 27/04/2008, 21h56   #4
Alexey Kulentsov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Reflection and used classes

Hugh Oxford wrote:

> Is there any way of using reflection to find out what classes other
> classes use?
>
> I do not mean which classes extend other classes, I mean within methods,
> for example, where the "new" keyword instantiates objects of other classes.
>
> Any ideas?


Sorry, but in languages like PHP here is no way to do such things
reliably. This is real code from my current project:

<CODE>
....
$classname=self::getClassName($classId);
$filename=strtolower($classId.'.object.php');

include_once $filename;

$object= new $classname($this,$parentId,$name);
....
</CODE>

Class names taken from XML file. So if you have case like this and
PHPxref is not enough for you - I think here are tools to do this as you
want.
  Réponse avec citation
 
Page generated in 0,05341 seconds with 9 queries