diff options
author | SVN Migration <svn@php.net> | 2005-06-10 18:06:44 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2005-06-10 18:06:44 +0000 |
commit | 02889a1980340caaa4f2450c834da87fb675f848 (patch) | |
tree | 2e0b0f07f6810a635d5ecba89f63b6bfb63126f8 /pear/tests/pear_registry_inc.php.inc | |
parent | 3b1f8e9ad74ad07580e4248b39fd0db261c31aa0 (diff) | |
download | php-git-php-5.0.1b1.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_0_1b1'.php-5.0.1b1
Diffstat (limited to 'pear/tests/pear_registry_inc.php.inc')
-rw-r--r-- | pear/tests/pear_registry_inc.php.inc | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/pear/tests/pear_registry_inc.php.inc b/pear/tests/pear_registry_inc.php.inc deleted file mode 100644 index 7cc395f081..0000000000 --- a/pear/tests/pear_registry_inc.php.inc +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -// ------------------------------------------------------------------------- // - -function cleanall($dir = null) -{ - if ($dir !== null) { - $statedir = $dir; - } else { - $statedir = $GLOBALS['statedir']; - } - if (file_exists($statedir)) { - $dp = opendir($statedir); - while ($ent = readdir($dp)) { - if (in_array($ent, array('.', '..'))) { - continue; - } - if (is_dir($statedir . DIRECTORY_SEPARATOR . $ent)) { - cleanall($statedir . DIRECTORY_SEPARATOR . $ent); - continue; - } - unlink($statedir . DIRECTORY_SEPARATOR . $ent); - } - closedir($dp); - rmdir($statedir); - } -} - - -function dumpall(&$reg) -{ - print "dumping registry...\n"; - $infos = $reg->allPackageInfo(); - foreach ($infos as $channel => $info) { - echo "channel $channel:\n"; - foreach ($info as $pkg) { - print $pkg["name"] . ":"; - unset($pkg["name"]); - foreach ($pkg as $k => $v) { - if ($k == '_lastmodified') continue; - if (is_array($v) && $k == 'filelist') { - print " $k=array("; - $i = 0; - foreach ($v as $k2 => $v2) { - if ($i++ > 0) print ","; - print "{$k2}["; - $j = 0; - foreach ($v2 as $k3 => $v3) { - if ($j++ > 0) print ","; - print "$k3=$v3"; - } - print "]"; - } - print ")"; - } else { - print " $k=\"$v\""; - } - } - print "\n"; - } - } - print "dump done\n"; -} - -require_once 'PEAR/ErrorStack.php'; -function dump_error($err) -{ - echo "caught ErrorStack error:\n"; - echo "message: ". $err['message'] . "\n"; - echo "code: ". $err['code'] . "\n"; -} -PEAR_ErrorStack::setDefaultCallback('dump_error'); -register_shutdown_function('cleanall'); -?>
\ No newline at end of file |