eee
This commit is contained in:
@@ -87,14 +87,16 @@ class Application extends BaseApplication
|
||||
|
||||
|
||||
/**
|
||||
* @param string $service
|
||||
* @param string ...$services
|
||||
* @return $this
|
||||
* @throws
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function import(string $service): static
|
||||
public function import(string ...$services): static
|
||||
{
|
||||
foreach ($services as $service) {
|
||||
if (!class_exists($service)) {
|
||||
return $this;
|
||||
continue;
|
||||
}
|
||||
|
||||
/** @var Kiri\Abstracts\Provider $class */
|
||||
@@ -102,6 +104,7 @@ class Application extends BaseApplication
|
||||
if (method_exists($class, 'onImport')) {
|
||||
$class->onImport();
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user