router update
This commit is contained in:
parent
74c6426500
commit
44c4a122f7
@ -60,6 +60,7 @@ class Router{
|
||||
}
|
||||
|
||||
if($this->function !== NULL){
|
||||
if(is_string($this->function)){
|
||||
if(strpos($this->function, '@') !== false){
|
||||
list($class, $function) = explode('@', $this->function);
|
||||
$method = new ReflectionMethod($class, $function);
|
||||
@ -70,6 +71,7 @@ class Router{
|
||||
}
|
||||
}else if(class_exists($this->function)){
|
||||
new $this->function(...$this->params);
|
||||
}
|
||||
}else if (is_callable($this->function)) {
|
||||
call_user_func_array($this->function, $this->params);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user