Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 5 Pomógł: 0 Dołączył: 7.06.2006 Skąd: Coventry, UK Ostrzeżenie: (0%)
|
cześć,
mam interfejs:
i implementację w MySQLUserDAO. testuję to sobie i dostaję taki błąd: Cytat Argument 1 passed to MySQLUserDAO::findUsersByFornameSurnameOrEmail() must be an instance of string, string given, called in (...) wywołanie w teście wygląda tak:
czy te typy argumentów to muszą być typy zdefiniowane przeze mnie, a nie wbudowane w PHP? Ten post edytował Can I 20.04.2007, 19:18:53 |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 793 Pomógł: 32 Dołączył: 23.11.2006 Skąd: Warszawa Ostrzeżenie: (0%)
|
I to jest w manualu, więc nie rozumiem czemu od razu nie odesłaliście...
http://www.php.net/manual/en/language.oop5.typehinting.php" title="Zobacz w manualu PHP" target="_manual Cytat PHP 5 introduces Type Hinting. Functions are now able to force parameters to be objects (by specifying the name of the class in the function prototype) or arrays (since PHP 5.1).
|
|
|
|
Can I niezgodność typów argumentów metody 20.04.2007, 19:14:05
Statozor Zmienna $queryStr musi być obiektem klasy str... 20.04.2007, 19:26:36
Can I no a nie jest?
czyli zgaduję, że w PHP5 nie ma ja... 20.04.2007, 19:32:23
Statozor Sam chciałem tak kiedyś zrobić ale też się nie dał... 20.04.2007, 19:37:19
batman Taki zapis
[PHP] pobierz, plaintext <?phppubli... 20.04.2007, 19:38:11
Can I rozumiem 20.04.2007, 23:46:27
dr_bonzo I wymuszac da sie, jak pamietam, tylko obiekty i t... 20.04.2007, 23:52:22
menic dobrze pamietasz 21.04.2007, 00:00:55
menic Sedziwoj: w manualu wszystko jest ;-) 21.04.2007, 18:37:48
Sedziwoj Cytat(menic @ 21.04.2007, 19:37:48 ) ... 21.04.2007, 18:41:12 ![]() ![]() |
|
Aktualny czas: 24.12.2025 - 10:15 |