public function __call($name, $args) { $class_name = "lib\\{$name}"; if (!class_exists($class_name)) { \lib\error::core("lib\\{$name}"); } else { $class_name_valid = $class_name; return new $class_name_valid($args); } }
public function __call($name, $args) { $path = array("ilib", "lib"); foreach ($path as $key => $value) { $class_name = "{$value}{$this->prefix}{$name}"; if (class_exists($class_name)) { return new $class_name(...$args); } } \lib\error::core("lib\\{$name}"); }