[TYPO3-core] use php5 for new code

Dmitry Dulepov [typo3] dmitry at typo3.org
Wed Oct 10 17:06:41 CEST 2007


Ingo Renner wrote:
> just some note on new code:
> 
> I'd like to see new developments to be in php5 only because of the more 
> advanced OO capabilities and encapsulation of object data.

So we can add new varaibles as public, protected and private, right?

Than we can have these rules:
- make most variables protected, not private to allow reusing them in the subclass/xclass
- make variable public only if you suspect it can be reused externally

This comes from my old experience with MFC/AFX framework, which was very logical on method and attribute access.

Opinions?

> With this I'd also ask for your opinion about exception handling...
> With one of my next patches I'd like to introduce exception classes.
> 
> How should they be named and where shall we put them?
> 
> How about this f.e.?
> t3lib/class.t3lib_invalidargumentexception.php

I.e. t3lib_InvalidArgumentException? Good, +1. The only problem that I see, is that not many extensions are ready for this. If they use try/catch, they will not work with 4.1 codebase on PHP4.

-- 
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs


More information about the TYPO3-team-core mailing list