diff --git a/FluentInterface/README.md b/FluentInterface/README.md new file mode 100644 index 0000000..7b605a4 --- /dev/null +++ b/FluentInterface/README.md @@ -0,0 +1,11 @@ +# 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 diff --git a/FluentInterface/SQL.php b/FluentInterface/SQL.php index 6074f70..6b7d82d 100644 --- a/FluentInterface/SQL.php +++ b/FluentInterface/SQL.php @@ -3,15 +3,7 @@ namespace DesignPatterns\FluentInterface; /** - * fluent interface pattern - * - * Purpose: - * to write code that is easy readable just like "real" sentences - * - * 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 + * class SQL */ class SQL {