1 | <?php |
||
8 | abstract class AbstractImport |
||
9 | { |
||
10 | protected $config; |
||
11 | private $filesystem; |
||
12 | |||
13 | 8 | public function __construct(Filesystem $filesystem=null) |
|
14 | { |
||
15 | 8 | $this->config = []; |
|
16 | 8 | $this->filesystem = $filesystem ? $filesystem : new Filesystem; |
|
17 | 8 | } |
|
18 | |||
19 | 5 | public function setConfig($config_file,$is_force=false) |
|
20 | { |
||
21 | 5 | $config = Yaml::parse($config_file); |
|
22 | 5 | if ( is_array($config) === false || $is_force ) { |
|
23 | 1 | $config = Yaml::parse($this->filesystem->get($config_file)); |
|
24 | 1 | } |
|
25 | 5 | if ( is_array($config) ) { |
|
26 | 5 | $this->config = array_merge($this->config,$config); |
|
27 | 5 | } |
|
28 | 5 | } |
|
29 | 1 | public function getConfig() |
|
49 | |||
50 | 4 | public function setModel($model,$config,$csv,$table) |
|
|
|||
51 | { |
||
74 | |||
75 | } |
||
76 | |||
78 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.