Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 400 Bytes

File metadata and controls

15 lines (9 loc) · 400 Bytes

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