Conf: argue !
"Wim Niemans ri" <[email protected]>
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Organization | Pb Solo |
| Message-ID | <421A6F0F.27942.B40074@localhost> |
Hi, There are some items worth discussing about Conf:, yes. 1. There is only the choice between Conf: loading files or Conf: using SQLite. Background: Conf: doesn't know which db to use. That is 'configured' with DataSources configuration. 2. It's funny to throw Exceptions, since you can't debug them. Background: Exception uses Debug uses Conf: 3. A complete path might be prefixed with (optional); 3.1. 'file://' => which means a file 3.2. 'db://' => which means the db 3.3. 'conf://' => a special hardcoded conf::file, necessary for essentials Note: this as a replacement for [scope]. 4. There is a rule for detecting a filePath in the treePath: 4.1. if it ends with .php or .ini or .xml => a file is requested 4.2. if it starts with 'file://' => a file is requested 4.3. Otherwise => a domain is requested 5. There is a variable 'version' which can be overloaded. It means: skip conf_values with version higher than "version". Version is initially '2.0'. The new conf: Class is Singleton, and creates children, if necessary. The structure is such that you can't overload config_values: you must use the method set(path,value). 6.1. A child for accessing conf::files, created only if necessary; there is a child for .php, .xml, .ini and for .db 6.3. A child for caching (in memory) conf_values of a complete domain. 6.4. Any access to Conf: takes care for caching the complete domain mentioned in the treePath (files). 6.5. Conf: may be 'configured' for caching: complete (db) or preLoad (files). 7. All values are stored in the db as Strings (mysql type text). Arrays are stored as ....... please suggest; choices: 7.1 valid php code 7.2 exported format 7.3 var_dumped format 7.4 serialized (manual doesn't like that) 7.5 syntax to be defined ? Proposal: all text in usage (a description of what the config_value is for) is in english and may contain a #stringId#. This could give an admin the opportunity to read these descriptions in a nice form in the original language and his/her own. This to avoid sloppy translations causing misunderstandings. Cheers, wim niemans