Last active
November 1, 2016 12:06
-
-
Save alanwillms/89d9ea76b925ba3ed37f to your computer and use it in GitHub Desktop.
Exemplo 1 de ISP em PHP
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 EstoqueProduto | |
{ | |
... | |
public function retirar($quantidade) { ... } | |
public function depositar($quantidade) { ... } | |
public function getValor() { ... } | |
... | |
} | |
class DemonstrativoContabilidade | |
{ | |
public function getPatrimonioLiquido() | |
{ | |
... | |
foreach ($estoques as $estoque) { | |
$patrimonio += $estoque->getValor(); // EstoqueProduto::getValor | |
} | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment