create(App::class); } /** * Returns the initialized class based on it's name * * @param string $name The name of the class * * @return object The initialized name * * @throws InternalServerErrorException */ public static function getClass(string $name) { if (class_exists($name) || interface_exists($name )) { return self::$dice->create($name); } else { throw new InternalServerErrorException('Class \'' . $name . '\' isn\'t valid.'); } } }