NotionCommotion Posted January 20, 2017 Share Posted January 20, 2017 https://forums.phpfreaks.com/topic/302974-oop-abstract-classes/ and http://forums.devshed.com/php-development-5/questioning-abstract-classes-vs-regular-classes-929822.html inspired me to more often use interfaces. I would like to start off with a good naming and directory strategy. Looks like two common naming approaches are appending "Interface" after the class name and prepending a capital "I" before the class name. For instance, if my class name was BinaryMathOperator, it might be BinaryMathOperatorInterface or IBinaryMathOperator. And maybe other standards? I've also seen including the interface file in the same directory as the class, and also creating a separate directory for all? the interfaces. A little off topic, but got me thinking... Is it typical to ever have more than one class implement the same interface (or some multiple interfaces)? This will have some bearing on the naming strategy. For one just starting off, what would you recommend? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.