mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-30 16:29:23 +02:00
cs Adapter
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\Adapter;
|
||||
|
||||
/**
|
||||
@@ -11,15 +7,19 @@ namespace DesignPatterns\Adapter;
|
||||
*/
|
||||
class Book implements PaperBookInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function open()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function turnPage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,6 @@ namespace DesignPatterns\Adapter;
|
||||
*/
|
||||
interface EBookInterface
|
||||
{
|
||||
|
||||
function pressNext();
|
||||
|
||||
function pressStart();
|
||||
|
@@ -1,27 +1,25 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\Adapter;
|
||||
|
||||
/**
|
||||
* Kindle is a concrete electronic book
|
||||
*
|
||||
* @author flo
|
||||
*/
|
||||
class Kindle implements ElecBookInterface
|
||||
class Kindle implements EBookInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function pressNext()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function pressStart()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\Adapter;
|
||||
|
||||
/**
|
||||
@@ -11,8 +7,17 @@ namespace DesignPatterns\Adapter;
|
||||
*/
|
||||
interface PaperBookInterface
|
||||
{
|
||||
/**
|
||||
* method to turn pages
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function turnPage();
|
||||
|
||||
function turnPage();
|
||||
|
||||
function open();
|
||||
}
|
||||
/**
|
||||
* method to open the book
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function open();
|
||||
}
|
||||
|
Reference in New Issue
Block a user