-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMain.php
37 lines (33 loc) · 980 Bytes
/
Main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/*
Developed by : Akn via Zote Innovation
Date : 28-Oct-2020
Last Modify Date : 28-Oct-2020
*/
namespace Zote\Application;
class Main{
protected static $_instance = null;
public function __call($name, $arguments) {
$name = "_".$name;
$functionList = get_class_methods($this);
//print_r($functionList);
if(in_array($name,$functionList)){
return $this->$name($arguments);
}
else{
throw new ExceptionHandler(ExceptionHandler::MethodNotFound($this,$name));
}
}
public static function __callStatic($name, $arguments) {
//print_r(static::$_instance );exit;
return static::$_instance->$name($arguments);
/*
if(in_array($name,$functionList)){
return self::$_instance->$name($arguments);
}
else{
throw new ExceptionHandler(ExceptionHandler::MethodNotFound(self::$_instance,$name));
}*/
}
}
?>