php - how to generate array that shows reletionship between multiple classes? -


i want php script scans php classes files in given directory(sub directories too) , generate relation ship between them in array form. suppose folder contains files , subdirectories( 2 subfolders).

| | |-class1.php | | \-class2.php | |-subdir1 | | |-class11.php | | \-class22.php | |-subdir2 | | \-class33.php 

it contains total 5 files.

scanning files in directory not big issue...but how can deliver class relationship between them.

i want array in form.

array([0]=>classname=>class1,extends=>class2,implements=>[0]class11[1]class22,[1]=>classname=>class2,extends=>class33,implements=>null)

hint: can done through reflection class.

can me?i need script.. thanks

extract files parts of code class<something not }>{<something perhaps containing nested {}>} , eval of pieces of code.

i guess have determine specific order in eval them (you might take note files include determine order, or take @ extends , implements)

then use reflection.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -