No title Revision 333133363533 (Thu Oct 15 2009 at 07:00) - Diff Link to this snippet: https://friendpaste.com/5Shdqz44xBlOnq4LsDdE2g Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152<?phpclass test{ private static $instance = null; public $dispatcher; public function __construct() { $this->dispatcher = new testclass(); } public static function get_instance() { if (is_null(self::$instance)) { self::$instance = new test(); } return self::$instance; } public function serve() { $this->dispatcher->test(); }}class testclass{ private $request_config; public function __construct() { $this->request_config = $this->get_midgard_connection()->get_request_config(); } public function get_midgard_connection() { return midgard_connection::get_instance(); } public function test() { $host = $this->request_config->get_host(); foreach ($this->request_config->get_pages() as $page) { var_dump($page); } }}test::get_instance()->serve();?>