Jump to content

Archived

This topic is now archived and is closed to further replies.

kyle2005

Classes - Extend

Recommended Posts

Hi all,

I am new to the class business and would like to find out how I will be able to do the following.

Let’s say my class structure looks as follows.

account.php

account/make.php
account/del.php
account/edit.php
account/login.php
account/logout.php

And I have a main class called account { }

And each time I need to make a new account I just use the acc_make extend account

But how does that work.

Any one with time that might have a site that explains this or any help would be nice.

Thanks

Share this post


Link to post
Share on other sites
I haven't dealt with extending, so you might just have to ignore my answer (and maybe explain your class a little better)... but why wouldn't you just create a new instance of the class for a new account?

Share this post


Link to post
Share on other sites
That is one way of doing it,

But I am sort off trying to do what the pear packages are doing, with the extend.

Share this post


Link to post
Share on other sites
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]But I am sort off trying to do what the pear packages are doing, with the extend.[/quote]
Why?

I meen really... If you dont understand OOP concepts, then just trying to do something without understanding the why wont help.

Id'e recommend googling for the book [i]thinking in java[/i]. It is a great resource for learning OOP concepts, and java's syntax really isn't too far removed from php's.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.