PHP Classes

This is a very good and useful class :-) Personaly, i dont ha...

Recommend this page to a friend!

      Guestbooks  >  All threads  >  This is a very good and useful class...  >  (Un) Subscribe thread alerts  
Subject:This is a very good and useful class...
Summary:Package rating comment
Messages:3
Author:José Filipe Lopes Santos
Date:2012-04-27 10:41:06
Update:2012-04-30 18:52:48
 

José Filipe Lopes Santos rated this package as follows:

Utility: Good
Consistency: Good
Examples: Good

  1. This is a very good and useful class...   Reply   Report abuse  
Picture of José Filipe Lopes Santos José Filipe Lopes Santos - 2012-04-27 10:41:06
This is a very good and useful class :-)
Personaly, i dont had work with class extensions ... :-)
In what situations you use abstract, and why is diferent than a public .. !
I use basicaly function foo, without specify if is public, private ... !
Is good to take this distinction ?
Thanks for tips :-)

  2. Re: This is a very good and useful class...   Reply   Report abuse  
Picture of Frederik Yssing Frederik Yssing - 2012-04-27 19:11:17 - In reply to message 1 from José Filipe Lopes Santos
First of all, thank you :)

I use the abstract sort of the same way, as a prototype i C.
I want every class that extends on the basic class to have its own implementation of that function. Granted I could have done that without using abstract.

But for me its a great way to make sure, that every class extension have its own implementation of the abstract function. This works really well if there are more people working on the classes.

The reason why I used abstract here, was to show my fellow students how it could be implemented.

The private and public declarations are used to "protect" functions from being accesible from outside the class. A Public function can be used outside the class ($foo->publicfunction) where as the private can only be used inside the class (self::privatefunction).

I hope this answers your questions, if not just ask again :)


  3. Re: This is a very good and useful class...   Reply   Report abuse  
Picture of José Filipe Lopes Santos José Filipe Lopes Santos - 2012-04-30 18:52:48 - In reply to message 2 from Frederik Yssing
Thank you for your answers :-)