Jump to content

Classes - Extend


kyle2005

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
Link to comment
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?
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.