Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php] Pobrac listę metod z klasy
angel2953
post
Post #1





Grupa: Zarejestrowani
Postów: 199
Pomógł: 5
Dołączył: 8.07.2004
Skąd: gdynia

Ostrzeżenie: (0%)
-----


Mając obiekt danej klasy jak wylistować wszystkie jego metody i zmienne (oczywiście te które są publiczne) :?:
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #2





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Ej no bez przesdady - jest w manualu...
możesz dac print_r($obiekt) - dostaniesz składowe.
A jak wyciągnąć metody, to poszukaj we wpomnianym manualu (IMG:http://forum.php.pl/style_emoticons/default/guitar.gif)

Pozdrawiam,
Go to the top of the page
+Quote Post
dr_bonzo
post
Post #3





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

Ostrzeżenie: (0%)
-----


Reflection w php5
tzn. tu: http://www.php.net/manual/en/language.oop5.reflection.php
Go to the top of the page
+Quote Post
NuLL
post
Post #4





Grupa: Zarejestrowani
Postów: 2 262
Pomógł: 21
Dołączył: 3.05.2004
Skąd: Sopot, Krakow, W-wa

Ostrzeżenie: (0%)
-----


A po co dzialo na mrowke (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) get_class_methods" title="Zobacz w manualu php" target="_manual (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
Fuzja
post
Post #5





Grupa: Zarejestrowani
Postów: 216
Pomógł: 0
Dołączył: 6.11.2005

Ostrzeżenie: (0%)
-----


Nie chodzilo o metody same tylko też zmienne.
czytaj dokładniej (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post
dr_bonzo
post
Post #6





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

Ostrzeżenie: (0%)
-----


Fuzja: nie tak szybko, w manualu bylo tez:

See also get_class(), get_class_vars() and get_object_vars().
Go to the top of the page
+Quote Post
mike
post
Post #7





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

Ostrzeżenie: (0%)
-----


Cytat(Fuzja @ 14.08.2006, 14:45 ) *
Że co poczytać? get_class_vars() ? (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)

Ja też uważam, że Reflection tu jest niepotrzebne.


P.S.
Przenosze na Przedszkole.
W końcu tam jest miejsce dla tych co manuala nie potrafią przeszukać pod kątem gotowej funkcji (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 26.08.2025 - 00:09