hobbit monitor
+ Reply to Thread
Results 1 to 2 of 2

Thread: Redefining PHP Classes

  1. #1
    Join Date
    Jun 2009
    Posts
    10

    Redefining PHP Classes

    Hi,
    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++.

    class A{}

    class B{
    private $classA;

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

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

    class A{
    private $classB;

    public function __construct($classB){
    $classB->someFunc();
    }
    }
    Thanks & regards
    Lokananth
    [url=http://www.mioot.com/]Live Chat Software[/url] By miOOt

  2. #2
    Join Date
    Sep 2009
    Posts
    1
    Not sure, but if you code.gif, it'll make it easier for everyone else to read.
    __________________________
    [url=http://www.ascotmortgage.com:]reverse mortgages[/url]
    [url=http://www.silvermako.com]cloud computing[/url]

+ Reply to Thread

Similar Threads

  1. OOP in PHP Part One - Classes and Inheritance
    By Moonbat in forum Programming
    Replies: 1
    Last Post: 07-27-2008, 01:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts