생성자에서 INI 파일을 구문 분석하는 것이 정상인지 또는 더 최적의 프로세스가 있는지 알고 싶습니까?INI 파일을 구문 분석 할 때의 장점/단점
public function __construct($ini_file) {
$ini = parse_ini_file($ini_file, true);
// Then set all the variables I need here from the INI
$this->variable_setting = $ini['ini_section']['ini_variable'];
}
뭔가 올바르게 구성되지 않은 경우 프로세스를 종료하고 싶습니다. –
이 경우 예외가 발생합니다. – ThiefMaster