/** * read '.config' file and set all config variable on accessible * array by `Config::get()` * * @param string $filePath */ protected static function readFileAndSetInArray($filePath) { // read file $lines = self::readFile($filePath); // Remove all lines start with hash (#) and dash (-) $lines = self::removeCommentFromLines($lines); // create new array with key and value self::$configList = array(); foreach ($lines as $line) { self::$configList[explode('=', $line, 2)[0]] = explode('=', $line, 2)[1]; } }