- renamed tftproot => data

- Added strict_types=1
- Added NameSpaces
- Fixed config::replaceSubdirTreeStructure function
- Fix tftp server

Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
This commit is contained in:
Diederik de Groot
2020-03-16 11:33:02 +01:00
parent 4d0eab9693
commit a36f459be2
10 changed files with 80 additions and 47 deletions

View File

@@ -1,10 +1,14 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
require_once("lib/tftp.php");
require_once("lib/config.php");
require_once("lib/resolver.php");
class TFTPProvisioner extends TFTPServer
use SCCP\TFTP as TFTP;
use SCCP\Resolve as Resolve;
class TFTPProvisioner extends TFTP\TFTPServer
{
private $_debug;
private $_resolver;
@@ -19,7 +23,7 @@ class TFTPProvisioner extends TFTPServer
parent::__construct($server_url, $logger);
$this->_debug = $debug;
$this->max_put_size = 60000000;
$this->_resolver = new Resolver($config);
$this->_resolver = new Resolve\Resolver($config);
$this->_settings_path = $this->_config['main']['base_path'] . DIRECTORY_SEPARATOR
. $this->_config['subdirs']['settings']['path'] . DIRECTORY_SEPARATOR;
}