mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2026-09-24 16:03:54 +02:00
Correction after some tests
This commit is contained in:
1 parent
05dd396eac
commit
6eaf2f0176
9 files changed
+99
-59
No files matched your search
@@ -6,14 +6,14 @@ class Factory
|
||||
{
|
||||
/**
|
||||
* @param array $config
|
||||
*
|
||||
* @return BackupAbstract
|
||||
*/
|
||||
public static function build(array $config)
|
||||
{
|
||||
$class = array_keys($config)[0];
|
||||
$class = __NAMESPACE__.'\\'.array_keys($config)[0];
|
||||
if (class_exists($class)) {
|
||||
/* @var $instance BackupAbstract */
|
||||
return new $class(array_values($config));
|
||||
return new $class(array_values($config)[0]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user