mirror of
				https://github.com/Chouchen/Shikiryu_Backup.git
				synced 2021-06-30 16:02:14 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			442 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			442 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace Shikiryu\Backup\Transport;
 | 
						|
 | 
						|
class Factory
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * @param $type
 | 
						|
     * @param Shikiryu_Backup_Abstract $backup
 | 
						|
     *
 | 
						|
     * @return bool
 | 
						|
     */
 | 
						|
    public static function build(array $config)
 | 
						|
    {
 | 
						|
        $class = array_keys($config)[0];
 | 
						|
        if (class_exists($class)) {
 | 
						|
            /* @var $instance BackupAbstract */
 | 
						|
            return new $class(array_values($config));
 | 
						|
        }
 | 
						|
        return null;
 | 
						|
    }
 | 
						|
} |