Plugin manager, misc fixes
* Fixed an error when trying to create nonexisting resource type * Updated the init-command to create plugins and scipts directories * Added a basic installer function
This commit is contained in:
@ -18,6 +18,9 @@ class ResourceManager
|
||||
|
||||
public function createResource(string $type, array $options)
|
||||
{
|
||||
if (!array_key_exists($type, $this->resourceTypes)) {
|
||||
return null;
|
||||
}
|
||||
$resource = new $this->resourceTypes[$type]($options);
|
||||
return $resource;
|
||||
}
|
||||
|
Reference in New Issue
Block a user