Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * Get the Compatibility info for a list of different source (directory, file)
4
 * which may have no link between them.
5
 *
6
 * This example show the new options|features available with API 1.8.0
7
 *
8
 * PHP versions 4 and 5
9
 *
10
 * @category PHP
11
 * @package  PHP_CompatInfo
12
 * @author   Laurent Laville <pear@laurent-laville.org>
13
 * @license  http://www.opensource.org/licenses/bsd-license.php  BSD
14
 * @version  CVS: $Id: pci180_parsearray_files.php,v 1.2 2008/07/22 20:26:45 farell Exp $
15
 * @link     http://pear.php.net/package/PHP_CompatInfo
16
 * @since    version 1.8.0b3 (2008-06-07)
17
 * @ignore
18
 */
19
 
20
require_once 'PHP/CompatInfo.php';
21
 
22
/*
23
   With all default options, its same as version 1.8.0b1 or less
24
   No need to specify driver type ('array') and options, in class constructor
25
   Results display made with PHP::var_export
26
*/
27
//$compatInfo = new PHP_CompatInfo();
28
 
29
/*
30
   With API 1.8.0 you may choose a custom render,
31
   between all default renderers (all customizable).
32
 */
33
$driverType = 'array';
34
 
35
/*
36
   Display wait messages or a progress bar (PEAR::Console_ProgressBar)
37
   if available while parsing data source
38
   Default behavior is:  silent = true (no wait system)
39
   Use (progress => text) if you don't want a progress bar but only text messages
40
 */
41
$driverOptions = array('silent' => false, 'progress' => 'bar');
42
 
43
$compatInfo = new PHP_CompatInfo($driverType, $driverOptions);
44
 
45
$source  = array('C:\wamp\tmp\Log-1.10.0\Log', 'C:\wamp\tmp\File_Find-1.3.0\Find.php');
46
$options = array();
47
$r = $compatInfo->parseArray($source, $options);
48
// You may also use the new unified method parseData(), parseArray() became an alias
49
//$r = $compatInfo->parseData($source, $options);
50
 
51
/*
52
   To keep backward compatibility, result is also return (here in $r)
53
   but you don't need to print it, it's the default behavior of API 1.8.0
54
 */
55
//var_export($r);
56
?>