[TYPO3-core] Adding visibility to methods and variables within t3lib_tcemain?
Philipp Gampe
philipp.gampe at typo3.org
Thu Jun 14 22:03:57 CEST 2012
Hi Xavier Perseguers,
> I thought of something slightly more clever and never even thought of
> duplicating code! By "overhead" I thought of looking in the stack trace
> for instance for the caller class...
>
> Duplicating code with underscore naming or similar is NOT the solution
> anyway.
How about using magic methods?
__get()
__set()
__isset()
__unset()
That would allow us change the visibily without impact to other extensions
and we can remove the magic methods 2 versions later.
http://php.net/manual/en/language.oop5.overloading.php
Note: works only in OOP context, not statically.
Cheers
--
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – linkvalidator
TYPO3 .... inspiring people to share!
More information about the TYPO3-team-core
mailing list