phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Name of new files only containing classes

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.1/Ascreaus followed by 3.2/Arsia.

Re: Name of new files only containing classes

Postby igorw » Fri May 07, 2010 1:21 pm

I have added the `phpbb_` prefix to the proposal.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: Name of new files only containing classes

Postby Oleg » Fri May 07, 2010 4:48 pm

So, class name of a cron task supplied by a modification would begin with phpbb_?
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: Name of new files only containing classes

Postby igorw » Fri May 07, 2010 5:10 pm

Yes, all new class names would begin with phpbb_.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: Name of new files only containing classes

Postby igorw » Sun May 30, 2010 10:02 am

I'd like to bump this. It would be nice to hear some more opinions/suggestions, especially from the devs.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: Name of new files only containing classes

Postby Nelsaidi » Sun May 30, 2010 1:24 pm

How would this integrate with other stuff making use of autoloading?
Nelsaidi
Registered User
 
Posts: 122
Joined: Tue Nov 11, 2008 5:44 pm

Re: Name of new files only containing classes

Postby igorw » Sun May 30, 2010 1:38 pm

It should not have an impact at all, since the current proposal doesn't make any use of autoloading. It uses a custom function to resolve class names and load the classes (the proposed phpbb_load_class function). Even if autoloading were to be used in the future, it should not matter really. Autoloading (when done right) is based on prefixes, so the Zend_ prefix does not clash with a phpbb prefix or namespace.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: Name of new files only containing classes

Postby igorw » Tue Jun 29, 2010 12:14 am

Just in case somebody reads this topic some day, the follow-up to this discussion with a slightly different proposal is here: viewtopic.php?f=84&t=33237
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Previous

Return to [3.x] Discussion

Who is online

Users browsing this forum: No registered users and 11 guests