Skip to content

Commit c850cb7

Browse files
committed
Adapter definition
1 parent 4a011d8 commit c850cb7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Adapter/index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
/*
4+
* Covert the interface of a class into another interface clients expects. Adapter lets classes work
5+
* together that couldn't otherwise because of incompatible interfaces.
6+
* */
7+
38
require 'vendor/autoload.php';
49

510
use Adapter\Book;

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ Christopher Alexander Says, "Each pattern describes a problem which occurs over
88

99

1010
#### 1.Decorator
11-
Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclass for extending functionality. [find here detail with example](https://github.com/hbrawnak/php-design-pattern/blob/master/Decorator/index.php#L4)
11+
Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclass for extending functionality. [find here detail with example](https://github.com/hbrawnak/php-design-pattern/blob/master/Decorator/index.php#L4)
12+
13+
#### 2.Adapter
14+
Covert the interface of a class into another interface clients expects. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces. [example](https://github.com/hbrawnak/php-design-pattern/blob/master/Adapter/index.php#L4)

0 commit comments

Comments
 (0)