Source code for file /joomla/registry/format.php
Documentation is available at format.php
* @version $Id: format.php 6472 2007-02-03 10:47:26Z pasamio $
* @package Joomla.Framework
* @copyright Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
// Check to ensure this file is within the rest of the framework
* Abstract Format for JRegistry
* @package Joomla.Framework
* Returns a reference to a Format object, only creating it
* if it doesn't already exist.
* @param string $format The format to load
* @return object Registry format handler
if (!isset
($instances)) {
if (empty ($instances[$format])) {
$adapter =
'JRegistryFormat'.
$format;
$instances[$format] =
new $adapter ();
return $instances[$format];
* Converts an XML formatted string into an object
* @param string $data Formatted string
* @return object Data Object
* Converts an object into a formatted string
* @param object $object Data Source Object
* @return string Formatted string