Bonjour,
J'ai ce code :
et ce code qui hérite du code ci-dessus :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 <?php namespace DubInfo_gestion_immobilier\business; use DubInfo_gestion_immobilier\data\AbstractDAO; abstract class AbstractBusiness { const GENRE_MASCULIN = 'm'; const GENRE_FEMININ = 'f'; /** * La classe de la couche data pour les opérations dans la DB * @var AbstractDAO */ private $_Dao; /** * Le nom de l'objet à traiter * @var string */ private $_name_item; /** * Le genre de l'objet * @var string */ private $_Genre; /** * * @param AbstractDAO $Dao * @param string $name_item * @param string $Genre */ function __construct(AbstractDAO $Dao, $name_item = "objet", $Genre = self::GENRE_MASCULIN) { $this->setDao($Dao); $this->setNameItem($name_item); $this->setGenre($Genre); } /** * Fonction qui retourne la liste des objets * @return array[mixed] * @throws PDOException */ public function readList() { return $this->getDao()->readList(); }
J'ai ce message d'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 abstract class VisiteBusiness extends AbstractBusiness{ /** * Fonction qui retourne la liste des objets pour un certain choix * @param int $data donnée envoyer avec la requête ajax * @return array[mixed] * @throws PDOException */ public function readList($data) { return $this->getDao()->readList($data['id']); }
Il me semble que c'est dû au fait que readList n'a pas de paramètre mais lors de l'héritage, readList prend un paramètre, vous confirmez ?<br />
<b>Strict Standards</b>: Declaration of DubInfo_gestion_immobilier\business\VisiteBusiness::readList
() should be compatible with DubInfo_gestion_immobilier\business\AbstractBusiness::readList() in <b>
/home/bestcolovv/www/CRM/business/VisiteBusiness.php</b> on line <b>11</b><br />
Comment est-il possible de résoudre ce problème svp ?
Merci d'avance.
bee
Partager