ADSL Traffic import

This commit is contained in:
Deon George
2020-05-28 15:08:13 +10:00
parent 86861a6daf
commit 7d41fb857a
9 changed files with 341 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ abstract class Supplier
* @param array $args
* @return mixed
*/
protected function connect(array $args=[])
public function connect(array $args=[])
{
if ($x=$this->mustPause()) {
Log::error('API Throttle, waiting .',['m'=>__METHOD__]);
@@ -80,7 +80,7 @@ abstract class Supplier
* @param Collection $expect
* @return Collection
*/
protected function getColumns(string $line,Collection $expect): Collection
public function getColumns(string $line,Collection $expect): Collection
{
$fields = collect(explode(',',$line))->filter();
$this->_columns = $expect;
@@ -98,11 +98,16 @@ abstract class Supplier
* @param string $key
* @return mixed
*/
protected function getColumnKey(string $key)
public function getColumnKey(string $key)
{
return $this->_columns->search($key);
}
public function header(): array
{
return static::$header;
}
/**
* If the supplier has API throttling...
*