public function __construct($config, $logger)
 {
     parent::__construct($config, $logger);
     $this->dbconnect = new $this->config['database']['data-adapter']($this->config, $this->logger);
     $this->ssh = new SSHConnector($this->config, $this->logger);
     $this->filename = $this->config['routerboard']['backupuser'] . '-' . date("Ydmhis", time());
 }
Esempio n. 2
0
 public function __construct($config, $logger)
 {
     parent::__construct($config, $logger);
     $this->client = new Client($this->config['gitlab']['url']);
     $this->client->authenticate($this->config['gitlab']['token'], $this->config['gitlab']['auth-method']);
     $this->idproject = false;
     $this->idgroup = false;
 }
 public function __construct($config, $logger)
 {
     parent::__construct($config, $logger);
     $this->gitlab = new GitLabAPI($this->config, $this->logger);
     if (!empty($this->config['gitlab']['group-name'])) {
         $this->checkExistGroup($this->config['gitlab']['group-name']);
     }
     $this->checkExistProject($this->config['gitlab']['project-name']);
     if ($this->config['gitlab']['debug'] == 1) {
         $this->logger->log("Project ID " . $this->gitlab->getProjectID(), $this->logger->setDebug());
         $this->logger->log("Group ID " . $this->gitlab->getGroupID(), $this->logger->setDebug());
     }
     $this->dbconnect = new $this->config['database']['data-adapter']($this->config, $this->logger);
     $this->ssh = new SSHConnector($this->config, $this->logger);
     $this->rootdir = $this->config['routerboard']['backupuser'];
     $this->filename = $this->rootdir;
     $this->folder = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $this->rootdir . DIRECTORY_SEPARATOR;
 }
Esempio n. 4
0
 public function __construct($config, $logger)
 {
     parent::__construct($config, $logger);
     $this->fsys = new Filesystem();
 }
Esempio n. 5
0
 public function __construct($config, $logger, $input)
 {
     parent::__construct($config, $logger);
     $this->validate = new IPValidator($config, $logger);
     $this->inputParserArray($input);
 }