Answer the question
In order to leave comments, you need to log in
How to refer to a static method, having only the name of the class in the variable?
$modules = array(
'catalog', 'shop', 'user', 'news', 'page', 'mail'
);
if(in_array(Router::$page,$modules)){
include self::PATH.Router::$page.'/index.php';
// как обратится к статическому методу, имея подключенный класс и название класса в Router::$page?
}else{
include self::PATH."show/index.php";
}
include self::PATH.Router::$page.'/index.php';
swith(Router::$page){
case "main"
include 'class/main/index.php';
main::show();
break;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question