Source for file Reader.class.php

Documentation is available at Reader.class.php

  1. <?php
  2. /**
  3.  * Gumbo Library Framework
  4.  *
  5.  * LICENSE
  6.  * This library is being released under the terms of the New BSD License.  A
  7.  * copy of the license is packaged with the software (LICENSE.txt).  If no
  8.  * copy is found, a copy of the license template can be found at:
  9.  * http://www.opensource.org/licenses/bsd-license.php
  10.  * 
  11.  * @category Gumbo
  12.  * @package Config
  13.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  14.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  15.  * @author Michael Luster <mluster79@yahoo.com>
  16.  * @link http://sourceforge.net/projects/phpgumbo
  17.  * @version 0.0.1
  18.  */
  19.  
  20. /**
  21.  * Config Reader Interface
  22.  * 
  23.  * A Config Reader is responsible for reading a particular type of configuration
  24.  * file into memory, and returning the details in a Composite form.  The class
  25.  * should indicate what type of file it is responsible for reading.  This will a
  26.  * allow the programmer to define various types of Readers.
  27.  * 
  28.  * In order to apply a Config Reader to Library, simply create a new class inside
  29.  * the '/gumbo/config/reader/*' directory.  The class name should be defined as
  30.  * 'Gumbo_Config_Reader_[type]' where 'type' is the type of configuration file
  31.  * it will be responsible for reading.  For example, supplied with the Library
  32.  * is a Gumbo_Config_Reader_Ini class.  This class will read INI files into
  33.  * memory.  The Config Type does not have to be a file format.
  34.  * 
  35.  * The only requirement is to return a Composite object.  This will provide a common
  36.  * interface for other systems to use.  Please refer to the Composite Package for
  37.  * more details.
  38.  *
  39.  * @category Gumbo
  40.  * @package Config
  41.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  42.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  43.  * @author Michael Luster <mluster79@yahoo.com>
  44.  * @link http://sourceforge.net/projects/phpgumbo
  45.  * @desc Config Reader Interface
  46.  * @version 0.0.1
  47.  * @see Gumbo_Interface_Composite
  48.  */
  49.  
  50.     
  51.     /** ACTION METHODS **/
  52.     /**
  53.      * Reads given config file into a Composite
  54.      * @precondition file_exists($file)
  55.      * @param string $file file to read (full path)
  56.      * @return Gumbo_Interface_Composite 
  57.      */
  58.     public function read ($file);
  59.     
  60. }
  61.  
  62. ?>