RvTwoClasses
[ class tree: RvTwoClasses ] [ index: RvTwoClasses ] [ all elements ]

Source for file rvtwoObject.php

Documentation is available at rvtwoObject.php

  1. <?php
  2. /**
  3.  * <b>Class Description</b>: Parent Class for all other rvtwo system classes.  To share data and functionality
  4.  * that is relevant throughout the entire application.
  5.  * @since : 29/04/2009
  6.  * @author Jan van der Breggen
  7.  * @package RvTwoClasses
  8.  * 
  9.  ***/
  10. {
  11.  
  12.  
  13.     /**
  14.      * Converts the contents of a configuration file stored in the filesystem location
  15.      * specified by the PATH_CONF constant into an associative array.  The lefthand value
  16.      * of each line in the config file in this array is the key and the right hand item is the value
  17.      * of the array.
  18.      *
  19.      * @param string $fileName 
  20.      * @param optional string $lineDelimiter - character that delimits an entry in the config file
  21.      * @param optional string $valueDelimiter - character that separates name and value of an entry in the config file
  22.      * @return associative array representing the menu configuration file
  23.      */
  24.     function convertConfigFileToArray($fileName$lineDelimiter ';',$valueDelimiter ',' )
  25.     {
  26.  
  27.         $file explode($lineDelimiterfile_get_contents(PATH_CONF "/$fileName"));
  28.         $config array();
  29.         foreach($file as $line)
  30.         {
  31.             $values explode($valueDelimiter$line);
  32.             if (count($values)==2){
  33.                 $config[trim($values[0])trim($values[1]);
  34.             }
  35.         }
  36.         return $config;
  37.  
  38.     }
  39.  
  40.     
  41.  
  42. }
  43.  
  44. ?>

Documentation generated on Mon, 18 May 2009 11:22:15 +0200 by phpDocumentor 1.4.1