Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /joomla/registry/format.php

Documentation is available at format.php

  1. <?php
  2. /**
  3.  * @version        $Id: format.php 6472 2007-02-03 10:47:26Z pasamio $
  4.  * @package        Joomla.Framework
  5.  * @subpackage    Registry
  6.  * @copyright    Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
  7.  * @license        GNU/GPL, see LICENSE.php
  8.  *  Joomla! is free software. This version may have been modified pursuant
  9.  *  to the GNU General Public License, and as distributed it includes or
  10.  *  is derivative of works licensed under the GNU General Public License or
  11.  *  other free or open source software licenses.
  12.  *  See COPYRIGHT.php for copyright notices and details.
  13.  */
  14.  
  15. // Check to ensure this file is within the rest of the framework
  16. defined('JPATH_BASE'or die();
  17.  
  18. /**
  19.  * Abstract Format for JRegistry
  20.  *
  21.  * @abstract
  22.  * @author         Samuel Moffatt <[email protected]>
  23.  * @package     Joomla.Framework
  24.  * @subpackage    Registry
  25.  * @since        1.5
  26.  */
  27. class JRegistryFormat extends JObject
  28. {
  29.     /**
  30.      * Returns a reference to a Format object, only creating it
  31.      * if it doesn't already exist.
  32.      *
  33.      * @static
  34.      * @param    string    $format    The format to load
  35.      * @return    object    Registry format handler
  36.      * @since    1.5
  37.      */
  38.     function &getInstance($format)
  39.     {
  40.         static $instances;
  41.  
  42.         if (!isset ($instances)) {
  43.             $instances array ();
  44.         }
  45.  
  46.         if (empty ($instances[$format])) {
  47.             $adapter 'JRegistryFormat'.$format;
  48.             jimport('joomla.registry.format.'.strtolower($format));
  49.             $instances[$formatnew $adapter ();
  50.         }
  51.         return $instances[$format];
  52.     }
  53.  
  54.     /**
  55.      * Converts an XML formatted string into an object
  56.      *
  57.      * @abstract
  58.      * @access    public
  59.      * @param    string    $data    Formatted string
  60.      * @return    object    Data Object
  61.      * @since    1.5
  62.      */
  63.     function stringToObject$data$namespace='' {
  64.         return true;
  65.     }
  66.  
  67.     /**
  68.      * Converts an object into a formatted string
  69.      *
  70.      * @abstract
  71.      * @access    public
  72.      * @param    object    $object    Data Source Object
  73.      * @return    string    Formatted string
  74.      * @since    1.5
  75.      */
  76.     function objectToString&$object {
  77.  
  78.     }
  79. }
  80. ?>

Documentation generated on Mon, 05 Mar 2007 20:59:36 +0000 by phpDocumentor 1.3.1