GeekPoint Forum Subscribe to Forum RSS WhoIsHostingThis.com
Please register or login on GeekPoint Forum.
It takes only a minute to register, & moreover,
majority of the ads shown will be removed!
Login OR Register
Register a Free Account
Reply
 
LinkBack Thread Tools
Old 08-12-2009   #1
gilbertsavier gilbertsavier is offline
Newbie
Join Date: Jun 2009 Posts: 18
Default Redefining PHP Classes

Hey there, I have a class A that uses class B. Class B also uses class A. This is recursive and am wondering if you can redefine PHP classes like in C++.

PHP Code: class {}

class 
{

    private 
$classA;

    public function 
__construct($classA)
    {
        
$this->classA $classA;
    }

    public function 
someFunc()
    {
        echo 
'blah';
    }
}

class 
{

    private 
$classB;

    public function 
__construct($classB)
    {
        
$classB->someFunc();
    }


Thanks & regards
Lokananth
Live Chat Software By miOOt
  Reply With Quote
Reply
Thread Tools