SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 234 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"


The site settings are located in the config namespace within the registry. A table
describing the values we expect to be present in the config namespace can be found
in the Appendix.
Saving and Loading Registry Values
A powerful feature of JRegistry objects is the capacity to save and load data. The
class supports two different format types, run-time data and files. Run-time data are
arrays and objects. File data can come from files in INI, PHP, and XML format.
In the previous three chapters, we have discussed the handling of extension
settings. In addition to those methods, we can use the JRegistry class. This example
demonstrates how to load an INI file into the myExtension namespace:
$file = JPATH_COMPONENT.DS.'myExtension.ini';
$registry =& JFactory::getConfig();
$registry->loadFile($file, 'INI', 'myExtension');
If we make changes to the myExtension namespace, we can save the changes back to
our INI file:
// import JFile
jimport('joomla.filesyste.file');
// prepare for save
$file = JPATH_COMPONENT.


Pages:
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6