Creating a list of Frontend Tasks for every Component

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
orware
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Jul 10, 2006 8:16 pm

Creating a list of Frontend Tasks for every Component

Post by orware » 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!

Post Reply