public function config()
 {
     $config = dirname(__FILE__) . '/user.properties';
     if (file_exists($config)) {
         $config = PurProperties::stringToArray(PurFile::read($config));
     } else {
         echo 'First running the test?' . PHP_EOL;
         echo 'A new file user.properties was created in tests directory.' . PHP_EOL;
         echo 'Modify it to feet your HBase installation, then the tests again.' . PHP_EOL;
         exit;
     }
     return $config;
 }
示例#2
0
	/**
	 * Create a multidimentional array from a property formated file.
	 * 
	 * @return array Multidimensional array
	 * @param string $path Path to the property file
	 */
	public static function read($path){
		return PurProperties::stringToArray(PurFile::read($path));
	}