Responses inline.
On Thu, May 3, 2012 at 10:46 AM, Elin Waring <
elin....@gmail.com> wrote:
>
> I think the current layout structure or something is quite useful and
> somewhat similar to the practices encouraged elsewhere, though looking at
> some files the last few days it seems like both the older and newer
> structures are supported in the platform. So I think it would be good to
> decide and maybe deprecate support for one or the other structure.
This was intentional to aide in place migration for 1.6 when it was
introduced. As we didn't do in place migration it's kind of a moot
point now and could probably remove that backwards compatibility
functionality.
> On Thursday, May 3, 2012 12:56:35 PM UTC-4, Rouven Weßling wrote:
>>
>> If we wanna use the autoloader for plug-ins - which is a nice idea - the
>> plg prefix isn't the problem. We can just register that as a prefix for the
>> correct folder with JLoader. The problem is that we have to repeat the last
>> part, i.e. for plgSearchContacts contacts will have to be duplicated because
>> the plugin is in plugins/search/contacts/contacts.php. I guess we'll end up
>> rolling a custom autoloader for it unless we wanna go back to the folder
>> layout of 1.5. (IMO not a good idea)
One way would be to do it per plugin type and register a prefix like
'plgSystem' which should work without modification. Would require
iterating over the top level but would work properly. This could
probably be handled in the importPlugin utility function.
Fundamentally we really don't save all that much since we know what
files we want to load from the database and need to instantiate the
classes inside to work out what they offer to call. It's a lot of work
to avoid loading a file immediately anyway.
Cheers,
Sam Moffatt
http://pasamio.id.au