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