Onde está o erro????
Erro:
Fatal error: Declaration of Estoque\Entity\Produto::setInputFilter(Zend\InputFilter\InputFilterAwareInterface $inputFilter) must be compatible with Zend\InputFilter\InputFilterAwareInterface::setInputFilter(Zend\InputFilter\InputFilterInterface $inputFilter) in C:\sistemas\Estoque\Skeleton-Application\module\Estoque\src\Estoque\Entity\Produto.php on line 11
Produto.php
''' <?php namespace Estoque\Entity;
use Doctrine\ORM\Mapping as ORM; use Zend\InputFilter\InputFilterAwareInterface; use Zend\InputFilter\InputFilterInterface; use Zend\InputFilte\InputFilter;
/** @ORM\Entity(repositoryClass="\Estoque\Entity\Repository\ProdutoRepository") */
class Produto implements InputFilterAwareInterface{ =====> linha 11
/**
*@ORM\Id
*@ORM\GeneratedValue(strategy="AUTO")
*@ORM\Column(type="integer")
*/
public $id;
/**
* @ORM\Column(type="string")
*/
private $nome;
/**
* @ORM\Column(type="decimal",scale=2)
*/
private $preco;
/**
* @ORM\Column(type="string")
*/
private $descricao;
public function __construct($nome,$preco,$descricao){
$this->nome = $nome;
$this->preco = $preco;
$this->descricao = $descricao;
}
public function getId(){
return $this->id;
}
public function getNome(){
return $this->nome;
}
public function getPreco(){
return $this->preco;
}
public function getDescricao(){
return $this->descricao;
}
public function setNome($nome){
$this->nome = $nome;
}
public function setPreco($preco){
$this->preco = $preco;
}
public function setDescricao($descricao){
$this->descricao = $descricao;
}
public function setInputFilter(InputFilterAwareInterface $inputFilter){
throw new Exception('Você não deve invocar este método');
}
public function getInputFilter(){
$inputFilter = new InputFilter();
$inputFilter->add([
'name' => 'nome',
'required' => true,
'validators' => [
[
'name' => 'StringLength',
'option' => [
'min' => 3,
'max' => 100
]
],
]
]);
return $inputFilter;
}
} ?> '''