Creating a list of Frontend Tasks for every Component
Posted: Sat Oct 20, 2007 4:06 pm
I'm in the planning stages for a new component that will be very useful for a lot of people (I know it will for me :-). Here is the only stumbling block I feel I'm going to have: How can I scan each component's Frontend PHP file and return a list of the tasks that are available?
So I don't want to parse the PHP file as an actual PHP document, I just want to read each PHP file in as text, and then using a regular expression or some other type of searching mechanism, pull out a list of the tasks that are in each PHP file.
So my question is, what PHP functions would best be used for something like this? Is a regular expression the best way to go?
I feel that it might be pretty resource intensive to do something like this, but it would be occurring very seldom so I know it will not be a problem.
I feel like I can roll out this component pretty quickly once I have a good idea about how to handle this part of the application.
Thanks everyone, I'll be checking back throughout the day!
So I don't want to parse the PHP file as an actual PHP document, I just want to read each PHP file in as text, and then using a regular expression or some other type of searching mechanism, pull out a list of the tasks that are in each PHP file.
So my question is, what PHP functions would best be used for something like this? Is a regular expression the best way to go?
I feel that it might be pretty resource intensive to do something like this, but it would be occurring very seldom so I know it will not be a problem.
I feel like I can roll out this component pretty quickly once I have a good idea about how to handle this part of the application.
Thanks everyone, I'll be checking back throughout the day!