2014-07-29 11:22:48 -05:00
..
2014-07-29 11:07:44 -05:00
2014-07-29 11:22:48 -05:00
2014-06-06 09:37:13 +02:00

Fluent Interface

Purpose

To write code that is easy readable just like sentences in a natural language (like English).

Examples

  • Doctrine2's QueryBuilder works something like that example class below
  • PHPUnit uses fluent interfaces to build mock objects
  • Yii Framework: CDbCommand and CActiveRecord use this pattern, too

UML Diagram

Alt FluentInterface UML Diagram