Thread: Question
View Single Post
Old 02-02-2008, 10:50 PM   #1 (permalink)
owenj2o
The Wanderer
 
Join Date: Jan 2008
Posts: 14
Thanks: 2
owenj2o is on a distinguished road
Default Question

Right I have a question.

PHP Code:
class frame {

    private static 
$instance;
    
    public function 
frame() {
        
self::instance &= $this;
    }
    
    static function 
getInstance() {
        return 
self::instance;
    }
}

function 
getInstance() {
    
$intstance frame::getInstance;
    return 
$instance;
}

class 
B expands frame {
    
    public function 
Foo() {
        echo(
'Foo');
    }
    
// Other Functions

If getInstance was ran would I ba able to access class B;
PHP Code:
$blah &= getInstance();
$blah->foo
Many Thanks,
Owen =)
owenj2o is offline  
Reply With Quote