<?php class system { protected function __construct() {} { if( self::$instance === false ) { self::$instance = new self(); } return self::$instance; } } { public function main_run() { } } $system = innysystem::get_instance(); $system->main_run(); ?>
ale podczas pobierania referencji przez funkcje get_instance() tworzy sie nowy obiekt z tym ze jest to 'system' a nie 'innysystem' wiec jak to najprosciej naprawic by we wszystkich klasach potomnych nie trzebabylo wklepywac tej samej funkcji get_instance() ?