Gc\Core\Updater::load PHP Method

load() public method

Load adapter
public load ( string $type ) : boolean
$type string Adapter type
return boolean
    public function load($type)
    {
        switch ($type) {
            case 'git':
                $adapter = new Adapter\Git();
                break;
            case 'basic':
                $adapter = new Adapter\Basic();
                break;
        }
        if (empty($adapter)) {
            return false;
        }
        $this->adapter = $adapter;
        return true;
    }

Usage Example

Esempio n. 1
0
 /**
  * Test
  *
  * @return void
  */
 public function testExecuteScripts()
 {
     file_put_contents($this->fileName, '<?php echo "test";');
     $this->object->load('git');
     $this->assertTrue($this->object->executeScripts());
     unlink($this->fileName);
 }
All Usage Examples Of Gc\Core\Updater::load