Development Articles
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDevelopment Articles

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #16  
Old October 17th, 2000, 07:38 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Great Article!

I read about classes in 2 php books and after understanding nothing from them I decided to give up on classes but I read this article and know I CAN SEE !!! I know understand classes.
<br>

Reply With Quote
  #17  
Old October 18th, 2000, 03:19 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Referring to function from different includes

Hello,

I have a question!

Q: I have many include files but I can't get them to interact with each other. For example...function abc in include file 1.inc can't make use of function xyz in include file 2.inc. How do I resolve this? Do you suggest having more than one include file? Or should I only have one large one?

Thank you in advance.

Piet

Reply With Quote
  #18  
Old October 19th, 2000, 11:21 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
a note on inheritence...

I skimmed through the article, as I consider myself a decent PHP programmer, however I did notice one thing I'd like to remind all you potential guru's of.

Unlike some languages, when you extend a current class, and the class you are extending has a constructor function, the NEW class does not automatically call the constructor of the old class. Instead, if the old constructor function is needed in the new class, you must add a new constructor function for the new class that calls the old constructor function. Examples follow:


<!-- Code -->
<p><pre><font color=#008000><xmp>
<?php
class mammal {

var $legs;

function mammal() {
//this is the constructor code
$legs = 4;
}

}

//This will not inherit the old constructor
// values:
class horse extends mammal {

funtion run() {
//whatever
}

}

//This will:
class cheetah extends mammal {

function cheetah() {
$this->mammal();
//this calls the constructor of the
// parent class
}

function run() {
//again, duh
}

}
?>
</xmp></font></pre><p>
<!-- Code -->


I hope this helps... it's important stuff :)

-S

Reply With Quote
  #19  
Old October 20th, 2000, 02:05 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
GOOD but missed

This is a well decorated document, the best of all it illustrate the code in 'English', this the new kid like me to learn more easily. The only part it miss, is the sample output. Yes some sample output will give a clearer idea what is happening.


I also notice that writing comment in this site is easy, that is a good point it.

thanks alot

Reply With Quote
  #20  
Old October 20th, 2000, 03:18 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Do I really need class?

yea i think the same i'd really like to know what classes are really good for cuz i dont see it yet

Reply With Quote
  #21  
Old October 21st, 2000, 10:23 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Great Article!

I have to agree. I have also tryed to read som books abaut class but the chapters with classes are always too small and dont explain much to me.

Reply With Quote
  #22  
Old October 22nd, 2000, 08:31 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: .php4??? NOoooo!!!

Mike, please elaborate.
httpd.conf is easily changed to support other extensions.

Reply With Quote
  #23  
Old October 24th, 2000, 01:21 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
U guys F***n' rock!!

U guys F***n' rock!!
U guys F***n' rock!!
U guys F***n' rock!!

Reply With Quote
  #24  
Old October 26th, 2000, 12:46 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: U guys F***n' rock!!

Violetta

Reply With Quote
  #25  
Old October 26th, 2000, 12:49 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
coment

Hey, I don't know what is going on here but I sure what to find out

Reply With Quote
  #26  
Old October 27th, 2000, 04:55 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Do I really need class?

Well, I know where I use classes, when I had a DB class and want to have different functions for each database type: mysql, postgresql, mssql, whatever, for an example look here (you can even 'dynamically load' them):
php.weblogs.com (dunno why they called it adodb though)

Reply With Quote
  #27  
Old October 27th, 2000, 09:48 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
PHP4 session class

Great article. I signed up for devshed
email list because of it.

Could you do an article on the new feature
of PHP4, session tracking / variables.

Thanks.

Reply With Quote
  #28  
Old October 27th, 2000, 10:39 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Finally, I C

Well after 6 months of reading about classes in books and on web sites and mail postings... now I understand. Started reading this article not really sure and now it's crystal.

Thanks I C arus...

Reply With Quote
  #29  
Old November 3rd, 2000, 07:22 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Readable articles

How the heck do the visitors of this site read these articles? There isn't any code formatting. Also, it would be nice to see some consistency in them, for example you have a wrong example and a right one, yet you use them both as though they're both correct:

#EXAMPLE 1
function start()
(
// code goes here
)

#EXAMPLE 2
function turnColourBlack()
{
$this->colour = "Black";
}

The 1st example is wrong, come on. It's no wonder there are so many forum posts about the articles you write, because nobody can understand them. One word: editor :]

-Feti Chico

p.s. If you'd like to know where I got the incorrect example, here is the URL:

http://www.devshed.com/Server_Side/PHP/BackToClass/page6.html

Reply With Quote
  #30  
Old November 5th, 2000, 04:46 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Re: Do I really need class?

One of the most important uses of classes is the ease of compatitbility when two or more people are writing code together. Modular programming can be very beneficial to have a class where the interface is separated from the implementation and allows people to add on to your code very easily. However, since it seems that most PHP programming is done on more of a personal basis, there probably is not as much code sharing going on as there would be in a more comercial program being written in C++.


Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDevelopment Articles > Back To Class


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT