sierrakomodo / inilib Goto Github PK
View Code? Open in Web Editor NEWA PHP library to provide better handling of parsing, editing, and writing INI files
License: GNU General Public License v3.0
A PHP library to provide better handling of parsing, editing, and writing INI files
License: GNU General Public License v3.0
Should you consider INI_SCANNER_TYPED
as default parsing behavior, as this would tend to yield data values in your array that are more meaningful to be used in other areas of the application (i.e. booleans vs. 'yes', 'no', 'on', 'off', etc.). This could of course be a problem for persisting to file as you would need to potentially have a conversion back to 'yes', 'no', etc.
Fetching a full section into an associative array may be a useful feature. Function will be similar to fetchEntry, but only use a single parameter for the section name. Return value should be an associative array or NULL.
const FETCH_STRING = 1;
const FETCH_MIXED = 2;
These do not seem to be used. Remove them.
Currently, the scanner mode only affects the reading of the INI file, and will not change values when they are being written to a file. As an example: Assume you have an INI file with key bSomeBooleanValue=off
. INI_SCANNER_NORMAL
will parse this as an empty string ''
, INI_SCANNER_RAW
as string 'off'
, and INI_SCANNER_TYPED
as boolean false
. Upon writing this data back to file, without any changes, this key will now have an empty value, a value of off
, or a value of 0
, respectively.
IniFile::saveDataToFile()
should be updated to convert boolean values, and other non-string types, to strings that best fit the INI scanner type currently in use (I.e., boolean true
to string 'true'
.
A second, internal, never-modified version of the data array containing the original INI contents might be desireable to compare against, and determine if saveDataToFile
should output 'on'
or 'true'
(And other variations of ambiguous entries)
Currently, the scanner mode can be arbitrarily defined whenever parseINIDate is called, and defaults to a value that may be different from what was set in the constructor.
https://travis-ci.org/SierraKomodo/INILib/jobs/236720541
Failure appears to only be due to EOL characters. Local test build (Ubuntu 16.04 on a standard LAMP stack) did not present this failure when running phpunit.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.