code: public function requirePackage(string $package_class) : ApplicationInterface
      {
          if (!in_array(PackageInterface::class, class_implements($package_class))){
              throw new PackageRequireException('Specified package does not implements PackageInterface: ' . $package_class, $package_class);
          }
  
          $module_list = call_user_func([$package_class, 'getModuleList']);
          if (!is_array($module_list)){
              throw new PackageRequireException('Failed to call getModuleList: ' . $package_class, $package_class);
          }
          $this->required_modules = array_merge($this->required_modules, $module_list);
  
          return $this;
      }
docs: Require a package
  
  @param string $package_class
  
  @return ApplicationInterface
  
  @throws PackageRequireException