public function __construct() { parent::__construct(); ///localhost/Oopatterns/singleton $this->view->title = "Object-Oriented Design Patterns"; if (method_exists($this, strtolower(Application::Parseurl(2)))) { $this->{strtolower(Application::Parseurl(2))}(); } else { echo "404"; } }