Last active
October 4, 2018 00:32
-
-
Save jorgecc/3ee453e573624eb1722872a072320218 to your computer and use it in GitHub Desktop.
DI Example 1
This file contains hidden or 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 | |
class ClassConvertMoneyWithoutInjection | |
{ | |
function conversor($value) | |
{ | |
return $value*1.15; | |
} | |
public function example($money) { | |
echo "$money is converted in ".$this->conversor($money)."<br>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment