初始化仓库
This commit is contained in:
28
vendor/clagiordano/weblibs-configmanager/src/FileConverter.php
vendored
Normal file
28
vendor/clagiordano/weblibs-configmanager/src/FileConverter.php
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace clagiordano\weblibs\configmanager;
|
||||
|
||||
/**
|
||||
* Class FileConverter
|
||||
* @package clagiordano\weblibs\configmanager
|
||||
*/
|
||||
class FileConverter implements IConvertable
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function convert(IConfigurable $source, IConfigurable $target)
|
||||
{
|
||||
return $target->setConfig($source->getConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function convertAndSave(IConfigurable $source, IConfigurable $target)
|
||||
{
|
||||
$target->setConfig($source->getConfig());
|
||||
|
||||
return $target->saveConfigFile();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user