File tree 2 files changed +12
-9
lines changed
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 3
3
namespace DesignPatterns \FluentInterface ;
4
4
5
5
/**
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
15
7
*/
16
8
class SQL
17
9
{
You can’t perform that action at this time.
0 commit comments