router update
This commit is contained in:
parent
44c4a122f7
commit
79b79bdfa5
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Mini Router
|
* Mini Router
|
||||||
* @author github.com/Xinatorus
|
* @author github.com/Xinatorus
|
||||||
* https://github.com/Xinatorus/MiniRouter
|
* https://github.com/Xinatorus/MiniRouter
|
||||||
*/
|
*/
|
||||||
class Router{
|
class Router{
|
||||||
|
|
||||||
private $routes;
|
private $routes;
|
||||||
@ -71,6 +71,8 @@ class Router{
|
|||||||
}
|
}
|
||||||
}else if(class_exists($this->function)){
|
}else if(class_exists($this->function)){
|
||||||
new $this->function(...$this->params);
|
new $this->function(...$this->params);
|
||||||
|
}else if (is_callable($this->function)) {
|
||||||
|
call_user_func_array($this->function, $this->params);
|
||||||
}
|
}
|
||||||
}else if (is_callable($this->function)) {
|
}else if (is_callable($this->function)) {
|
||||||
call_user_func_array($this->function, $this->params);
|
call_user_func_array($this->function, $this->params);
|
||||||
|
Loading…
Reference in New Issue
Block a user