[TYPO3-dev] Hooks and protected class members

Ingo Renner ingo at typo3.org
Sun Nov 14 00:19:54 CET 2010


Martin Kutschker wrote:

> Generally I don't
> think that a hook subscriber should have access to all protected members by default.

agreed, usually there's a reason for that... it's called OOP and data 
encapsulation.

So if you want to access a protected member, make sure to introduce a 
getter and setter.


best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2





More information about the TYPO3-dev mailing list