Do you think it’s a good practice to differentiate abstract from non-abstract classes by giving their name a prefix or a suffix? What are the most common practices when it comes to that?
Here are a few “formats” I’ve been thinking about:
- Foo_Base
- Foo_Abstract
- Abstract_Foo
- Base_Foo
The use of underscores and letter case is irrelevant.
Edit: It seems like the Zend Framework uses a “Abstract” suffix (source).
Unless you’re following some convention, I would suggest not to attach this type of meta-data to your class names. Basically it clutters the code with information available elsewhere. To me it resembles hungarian notation which is loathed by many programmers.
If I had to choose, I’d go with
AbstractFoo.According to these PHP Coding Standard you should really avoid
_: