Learning Classes

Talk about anything in here.
Post Reply
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Learning Classes

Post by EcazS »

I looked at some PHP Classes earlier today and realized I didn't understand anything of it at all, so I watched some videos on classes and now I understand a little bit more, hooraay!

BUT I really wanna learn classes but I have nothing to do except my full blown CMS that I was going to do later this year :roll:
Any ideas on what you could create just to learn? Could be simple stuff (preferably) :lol:
Tino
Posts: 360
Joined: Thu May 05, 2011 8:55 pm
Location: The Netherlands

Re: Learning Classes

Post by Tino »

You mean you want to learn object-oriented programming. ;)

What you could try to do? I don't really know. Just try to convert something you created earlier to use OOP instead?
Please check out my CodeCanyon items.
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: Learning Classes

Post by EcazS »

Tino wrote:You mean you want to learn object-oriented programming. ;)
So that's what that is :shock: I feel really stupid right now....*cough*

All I have locally is this stupid contact form :lol:
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Learning Classes

Post by jacek »

There is no point doing it just for the sake of it. You need a good example of how it can be better to use classes. I will do some videos on this when I get my mic working :evil:

Just to know how they work you can just make anything at all really. If you have a login system for your site, replace all of the functions with methods in a class.
EcazS wrote:So that's what that is :shock: I feel really stupid right now....*cough*
It's just what it's called, you create an instance of a class with the new keyword
$class = new class();
The $class variable is now an object.
Image
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: Learning Classes

Post by EcazS »

jacek wrote:I will do some videos on this when I get my mic working
I like what I see, when will that be? :lol:
jacek wrote:
$class = new class();
The $class variable is now an object.
I knew that much :lol:
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Learning Classes

Post by jacek »

EcazS wrote:I like what I see, when will that be? :lol:
No idea, I will try to fix my mic input tomorrow after my last exam ( :D :D :D :D :D ) If it works then I will just keep this slightly worse headset and use it to make about a million videos next week.
Image
Post Reply