Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Pobrac listę metod z klasy
angel2953
post 14.08.2006, 13:09:43
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) :?:


--------------------
Sygnaturkę ukradli
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 6)
Cysiaczek
post 14.08.2006, 13:13:54
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 guitar.gif

Pozdrawiam,


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
dr_bonzo
post 14.08.2006, 13:15:34
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


--------------------
Nie lubię jednorożców.
Go to the top of the page
+Quote Post
NuLL
post 14.08.2006, 13:34:58
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 questionmark.gif get_class_methods" title="Zobacz w manualu php" target="_manual smile.gif


--------------------
Javascript, Coffeescript, Node.js, Mongo, CouchDb, chmury, workery & inne bajery - zycie jest zbyt krotkie aby miec nudna prace :)
Go to the top of the page
+Quote Post
Fuzja
post 14.08.2006, 13:45:24
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 winksmiley.jpg
Go to the top of the page
+Quote Post
dr_bonzo
post 14.08.2006, 13:55:55
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().


--------------------
Nie lubię jednorożców.
Go to the top of the page
+Quote Post
mike
post 14.08.2006, 13:57:11
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 ) *
czytaj dokładniej winksmiley.jpg
Że co poczytać? get_class_vars() ? 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 tongue.gif tongue.gif
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 13.08.2025 - 22:35