036717a1
Mihail
add error excepti...
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
'csv' =>
['web' =>
['class' => 'backend\components\parsers\CustomCsvParser',
'auto_detect_first_line' => true,]]];
public static function getConfiguration($extension, $mode)
{
if (!isset( self::$configuration[$extension] )){
throw new \ErrorException( "Parser do not maintain file with extension {$extension}");
}
if (!isset( self::$configuration[$extension][$mode] )){
throw new \ErrorException( "Parser configurator do not have settings for {$mode} mode");
}
return self::$configuration[$extension][$mode];
}
}
|