SPL-StandardPHPLibrary
ini_groups.php
Go to the documentation of this file.
1 <?php
2 
17 if ($argc < 2) {
18  echo <<<EOF
19 Usage: php dba_dump.php <file> [<regex>]
20 
21 Show all groups in the ini file specified by <file>.
22 The regular expression <regex> is used to filter the result.
23 
24 
25 EOF;
26  exit(1);
27 }
28 
29 if (!class_exists("KeyFilter", false)) require_once("keyfilter.inc");
30 if (!class_exists("IniGroups", false)) require_once("inigroups.inc");
31 
32 $it = new IniGroups($argv[1]);
33 if ($argc>2) {
34  $it = new KeyFilter($it, $argv[2]);
35 }
36 
37 foreach($it as $group) {
38  echo "$group\n";
39 }
40 
41 ?>
Class to iterate all groups within an ini file.
Definition: inigroups.inc:28
$it
Definition: class_tree.php:105
Regular expression filter for string iterators.
Definition: keyfilter.inc:22