cs Adapter

This commit is contained in:
Dominik Liebler
2013-09-09 10:50:00 +02:00
parent 3b7eb295c8
commit 33671aec55
5 changed files with 35 additions and 33 deletions

View File

@@ -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()
{
}
}
}
}

View File

@@ -7,7 +7,6 @@ namespace DesignPatterns\Adapter;
*/
interface EBookInterface
{
function pressNext();
function pressStart();

View File

@@ -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()
{
}
}
}
}

View File

@@ -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();
}