Best way to profile classes of CI and my App - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Best way to profile classes of CI and my App (/showthread.php?tid=62632) |
Best way to profile classes of CI and my App - jLinux - 08-07-2015 Im writing a plugin library, and part of the plugin installation is to check the plugins .php files and look at all class/methods/functions it uses, and just display a notice if whats utilized in the plugin. The part im not 100% sure on, is how should I profile the classes/methods/functions? Right now, I have a file that contains an array, which has a friendly name of the class, then the regex pattern to use when searching for it, and a description. class_profiles.php PHP Code: <?php Currently, heres a rough draft of the function that parses the plugins php files, (Its not done, just including it to give you an idea of what its doing thus far) PHP Code: <?php So, does anyone think that there might be a better way to do this? I was thinking maybe look for the PHPDoc comments of the functions/classes as the description? That might just be used to populate the class_profiles.php though. Also, if theres a function "something", How would one ensure that the regex is matching the class, and not just something in a sentence. RE: Best way to profile classes of CI and my App - jLinux - 08-08-2015 Bump? |