Last active
September 22, 2015 12:04
-
-
Save piwi91/bca76aa41ee0c7e1c1a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface WebserviceInterface | |
{ | |
public function getFoo(); | |
} | |
class Webservice implements WebserviceInterface | |
{ | |
public function getFoo() | |
{ | |
return 'bar'; | |
} | |
} | |
class WebserviceImplementation | |
{ | |
public function __construct(WebserviceInterface $webservice) | |
{ | |
$this->webservice = $webservice; | |
} | |
public function doSomethingWithFoo() | |
{ | |
$this->webservice->getFoo(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment