1 | <?php |
||
2 | class WebApp extends Module { |
||
|
|||
3 | protected $pages; |
||
4 | protected $defaultPage; |
||
5 | public $currentPage; |
||
6 | public $jConfig; |
||
7 | public function __construct() { |
||
14 | public function addPage( $_page ) { |
||
15 | $path = ""; |
||
16 | $class = ""; |
||
17 | $param = []; |
||
18 | if(is_array($_page)) { |
||
19 | $path = $_page[0]; |
||
20 | $class = $_page[1]; |
||
21 | if(isset($_page[2])) |
||
22 | $param = $_page[2]; |
||
23 | } else { |
||
24 | $path = $_page; |
||
25 | $class = $_page; |
||
26 | } |
||
27 | $this->pages[$path] = [$class,$param]; |
||
28 | } |
||
29 | public function addPages( $_pages ) { |
||
33 | public function fetchPage( $_stack ) { |
||
34 | $parameters = []; |
||
86 | } |
||
87 | ?> |
||
88 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.