[TYPO3-50-general] File name conventions for classes and interfaces
Ingo Renner
typo3 at ingo-renner.com
Tue Dec 12 03:09:53 CET 2006
Martin Kutschker wrote:
Hi Martin,
> Say I have a class MyClass which is no interface and implements no
> interface. And there is the interface MyAPI, which defines an interface.
>
> So the files are called: MyClass.php and MyAPI.php. Is this a problem
> for you?
this is the exact problem with this naming scheme!
> Maybe this was the reason why Java uses the "I" prefix.
probably...
> Otherwise your idea is good.
I fear I have to disagree, but I think it's not a good idea.
> So we have TemplateEngineInterface.php or ITemplateEngine.php but STILL
> SmartyTemplateEngine (pre-/suffix dropped).
in this case only ITemplateEngine would be an interface, the other two
would be classes.
> In the case of implementations of more than one interface I would not
> use any interface name in the file name.
I think I already wrote that in response to Joerg's message, just don't
add the implemented interfaces to the file name. That would lead to
problems if you change which interfaces a class implements.
Ingo
More information about the TYPO3-project-5_0-general
mailing list