Warning: session_start() [function.session-start]: open(/var/lib/php-sessions//sess_b81500f2b7a264f1161e12b71f5fdcb7, O_RDWR) failed: Permission denied (13) in /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php:2) in /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php:2) in /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php on line 3
GOPROD • GOod PRactice in Object oriented Design
Login :
Password :

Design patterns

Adapter

Static diagram for class adapter :

Static diagram for class adapter

Static diagram form object adapter :

Static diagram form object adapter

Description :

Type :  St  (Structural)
Intent : Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
Applicability : Use the Adapter pattern when :
- you want to use an existing class, and its interface does not match the one you need.
- you want to create a reusable class that cooperates with unrelated or unforeseen classes, that is, classes that don't necessarily have compatible interfaces.
- (object adapter only) you need to use several existing subclasses, but it's impractical to adapt their interface by subclassing every one. An object adapter can adapt the interface of its parent class

Pattern's participants :

Problems :

  1. 1. Adap black box class protocol
Les têtes de mule
Cédric BOUHOURS
Cédric BOUHOURS
Cédric BOUHOURS

Warning: Unknown: open(/var/lib/php-sessions//sess_b81500f2b7a264f1161e12b71f5fdcb7, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php-sessions/) in Unknown on line 0