mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 12:40:11 +02:00
README FluentInterface
This commit is contained in:
11
FluentInterface/README.md
Normal file
11
FluentInterface/README.md
Normal file
@@ -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
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user