I'm having trouble declaring a interface
to classe
in PHP
where I'm encapsulating the entire program with namespace
. I created a interface
called IFile in the Cnab\Remessa
directory and set the functions for that interface. Then I created a class named File in the Cnab\Remessa\Cnab240
directory where when trying to declare the interface to the class, an interface error not found.
INTERFACE
namespace Cnab\Remessa;
interface IArquivo {
public function obter_cabecalho(array $parametros);
public function obter_detalhes(array $parametros);
public function grava_texto($nome_do_arquivo);
}
CLASS
namespace Cnab\Remessa\Cnab240;
class Arquivo implements \Cnab\Remessa\IArquivo {
public function obter_cabecalho(array $parametros){}
public function obter_detalhes(array $parametros){}
public function grava_texto($nome_do_arquivo){}
}