Source for file format.php
Documentation is available at format.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Abstract Format for JRegistry
* @package Joomla.Platform
* @var array JRegistryFormat instances container.
protected static $instances =
array();
* Returns a reference to a Format object, only creating it
* if it doesn't already exist.
* @param string $type The format to load
* @return JRegistryFormat Registry format handler
* @throws InvalidArgumentException
// Only instantiate the object if it doesn't already exist.
if (!isset
(self::$instances[$type]))
// Only load the file if the class does not exist.
$class =
'JRegistryFormat' .
$type;
if (!class_exists($class))
$path = __DIR__ .
'/format/' .
$type .
'.php';
throw
new InvalidArgumentException('Unable to load format class.', 500);
self::$instances[$type] =
new $class;
return self::$instances[$type];
* Converts an object into a formatted string.
* @param object $object Data Source Object.
* @param array $options An array of options for the formatter.
* @return string Formatted string.
* Converts a formatted string into an object.
* @param string $data Formatted string
* @param array $options An array of options for the formatter.
* @return object Data Object
abstract public function stringToObject($data, array $options =
array());
Documentation generated on Tue, 19 Nov 2013 15:03:44 +0100 by phpDocumentor 1.4.3