Skip to content

Commit 1d166d4

Browse files
author
Dominik Liebler
committed
README FluentInterface
1 parent 851aa0a commit 1d166d4

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

FluentInterface/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Fluent Interface
2+
3+
## Purpose
4+
5+
To write code that is easy readable just like sentences in a natural language (like English).
6+
7+
## Examples
8+
9+
* Doctrine2's QueryBuilder works something like that example class below
10+
* PHPUnit uses fluent interfaces to build mock objects
11+
* Yii Framework: CDbCommand and CActiveRecord use this pattern, too

FluentInterface/SQL.php

+1-9
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@
33
namespace DesignPatterns\FluentInterface;
44

55
/**
6-
* fluent interface pattern
7-
*
8-
* Purpose:
9-
* to write code that is easy readable just like "real" sentences
10-
*
11-
* Examples:
12-
* - Doctrine2's QueryBuilder works something like that example class below
13-
* - PHPUnit uses fluent interfaces to build mock objects
14-
* - Yii Framework: CDbCommand and CActiveRecord use this pattern, too
6+
* class SQL
157
*/
168
class SQL
179
{

0 commit comments

Comments
 (0)