--- Revision None +++ Revision 333133363533 @@ -0,0 +1,52 @@ +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(); + +?>