Where to find "template" interfaces?

I wonder where you can find the template interfaces.

eg. I create these classes that implement iLog:

 DatabaseLog
 ScreenLog
 FileLog

I wonder what methods a regular log class should have?

There is a set of interfaces that you could just implement / learn, rather than reinvent the wheel and think about method names.

eg. Interfaces:

 iLog
 iDatabase
 iErrorMessage
 etc.

thank

0
source share
1 answer

PHP defines the following interfaces (should, but may not be complete):

  • Traversable - Traversable interface
  • Iterator - Iterator Interface
  • IteratorAggregate - IteratorAggregate interface
  • ArrayAccess - ArrayAccess Interface
  • Serializable - Serializable Interface
  • Counting - counter interface
  • OuterIterator - OuterIterator interface
  • RecursiveIterator - RecursiveIterator
  • SeekableIterator - SeekableIterator
  • SplObserver - SplObserver
  • SplSubject - SplSubject

.

Logger Interface, , log($message, level) .

+1

All Articles