Skip to content

Instantly share code, notes, and snippets.

@vahid-almasi
Created July 17, 2019 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vahid-almasi/f122d21013316e1974dc01726b2712b0 to your computer and use it in GitHub Desktop.
Save vahid-almasi/f122d21013316e1974dc01726b2712b0 to your computer and use it in GitHub Desktop.
<?php
class eReaderAdapter implements BookInterface {
private $reader;
public function __construct(eReaderInterface $reader)
{
$this->reader = $reader;
}
public function open()
{
return $this->reader->turnOn();
}
public function turnPage()
{
return $this->reader->pressNextButton();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment