Source for file Converter.class.php

Documentation is available at Converter.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 Converter
  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.  * Converter Interface, convert data from one type to another
  22.  * 
  23.  * A Converter is responsible for changing data from form to another.  The
  24.  * Library provides a Blank Converter.  This will simply return the data as it's passed.
  25.  * 
  26.  * A single Converter will be responsible for performing multiple conversion tasks.  The
  27.  * Interface defines a way to convert 'data' to a particular format (as 'to' argument).
  28.  * The details are defined by the class implementation.
  29.  *
  30.  * @category Gumbo
  31.  * @package Converter
  32.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  33.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  34.  * @author Michael Luster <mluster79@yahoo.com>
  35.  * @link http://sourceforge.net/projects/phpgumbo
  36.  * @desc Converter Interface, convert data from one type to another
  37.  * @version 0.0.1
  38.  */
  39.  
  40.     
  41.     /**
  42.      * Converts one variable type to another
  43.      * @param mixed $data 
  44.      * @param string $to 
  45.      * @return mixed 
  46.      */
  47.     public function convert ($data$to=null);
  48.     
  49. }
  50.  
  51. ?>