In the example:
public function getEstoqueDeposito($busca, $deposito = FALSE) {
...
}
I know what I could do:
public function getEstoqueDeposito($busca, $deposito = FALSE) {
if($busca == 'TOTAL'){
...
return "whatever";
} else if($busca == 'GRUPO'){
...
return "whatever";
}
return "Parâmetro inválido";
}
Finally, I would like to pre-define the values (TOTAL or GROUP) in the $ search parameter, in PHP, have any way to do this without having to test inside the function?