Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: OOP for beginers need some


Message #1 by "jorge" <jorge@d...> on Wed, 13 Nov 2002 19:22:53 -0600
OO style:
class fooBar
{
 function fooBar()
 { 
  // Code here gets executed as soon as the fooBar class is called.
 }

 function someFunc()
 {
  // Some code here to do something.
 }
}

Now to call that function from the fooBar class:

$foo = new fooBar; // Create a new instance of the fooBar class.
$foo->someFunc(); // Call the someFun function from the above class.

This is a very brief idea of how the OO style works..
For further (and more detailed) info I highly reccomend you read this 
section of the PHP manual:

Classes and Objects
http://www.php.net/manual/en/language.oop.php

Hope this helps..

Regards,
Chris


> Hi there i have a very good understanding of methods an fucntions as a 
>matter of fact i have created a methods or functions library that i 
>used,  for almost all the situations that i need.

>So how can i make the next step to OOP


  Return to Index