catalog/0000755577340101002240000000000010625430715014160 5ustar tonerlogicspg11675700000000000000catalog/libs/0000755577340101002240000000000010625430434015107 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/0000755577340101002240000000000010625430312015631 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.registry/0000755577340101002240000000000010625427740017572 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.registry/.channel.pecl.php.net/0000755577340101002240000000000010625423062023546 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.registry/.channel.__uri/0000755577340101002240000000000010625423062022345 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.registry/archive_tar.reg0000644577340101002240000002117010625427730022560 0ustar tonerlogicspg11675700000000000000a:24:{s:7:"attribs";a:6:{s:15:"packagerversion";s:8:"1.5.0RC2";s:7:"version";s:3:"2.0";s:5:"xmlns";s:35:"http://pear.php.net/dtd/package-2.0";s:11:"xmlns:tasks";s:33:"http://pear.php.net/dtd/tasks-1.0";s:9:"xmlns:xsi";s:41:"http://www.w3.org/2001/XMLSchema-instance";s:18:"xsi:schemaLocation";s:147:"http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd";}s:4:"name";s:11:"Archive_Tar";s:7:"channel";s:12:"pear.php.net";s:7:"summary";s:25:"Tar file management class";s:11:"description";s:257:"This class provides handling of tar files in PHP. It supports creating, listing, extracting and adding to tar files. Gzip support is available if PHP has the zlib extension built-in or loaded. Bz2 compression is also supported with the bz2 extension loaded.";s:4:"lead";a:2:{i:0;a:4:{s:4:"name";s:14:"Gregory Beaver";s:4:"user";s:6:"cellog";s:5:"email";s:14:"cellog@php.net";s:6:"active";s:3:"yes";}i:1;a:4:{s:4:"name";s:14:"Vincent Blavet";s:4:"user";s:7:"vblavet";s:5:"email";s:22:"vincent@phpconcept.net";s:6:"active";s:2:"no";}}s:6:"helper";a:4:{s:4:"name";s:11:"Stig Bakken";s:4:"user";s:3:"ssb";s:5:"email";s:12:"stig@php.net";s:6:"active";s:2:"no";}s:4:"date";s:10:"2007-01-03";s:4:"time";s:8:"15:31:40";s:7:"version";a:2:{s:7:"release";s:5:"1.3.2";s:3:"api";s:5:"1.3.2";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:485:"Correct Bug #4016 Remove duplicate remove error display with '@' Correct Bug #3909 : Check existence of OS_WINDOWS constant Correct Bug #5452 fix for "lone zero block" when untarring packages Change filemode (from pear-core/Archive/Tar.php v.1.21) Correct Bug #6486 Can not extract symlinks Correct Bug #6933 Archive_Tar (Tar file management class) Directory traversal Correct Bug #8114 Files added on-the-fly not storing date Correct Bug #9352 Bug on _dirCheck function over nfs path";s:8:"contents";a:1:{s:3:"dir";a:2:{s:7:"attribs";a:1:{s:4:"name";s:1:"/";}s:4:"file";a:2:{i:0;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"06409d39f4268a9aa9e2924c7f397a38";s:4:"name";s:15:"Archive/Tar.php";s:4:"role";s:3:"php";}}i:1;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"29b03715377b18b1fafcff98a99cc9a7";s:4:"name";s:20:"docs/Archive_Tar.txt";s:4:"role";s:3:"doc";}}}}}s:10:"compatible";a:4:{s:4:"name";s:4:"PEAR";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.4.0";s:3:"max";s:8:"1.5.0RC2";}s:12:"dependencies";a:1:{s:8:"required";a:2:{s:3:"php";a:1:{s:3:"min";s:5:"4.0.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:7:"1.4.0b1";}}}s:10:"phprelease";s:0:"";s:9:"changelog";a:1:{s:7:"release";a:10:{i:0;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"1.3.1";s:3:"api";s:5:"1.3.1";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2005-03-17";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:17:"Correct Bug #3855";}i:1;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"1.3.0";s:3:"api";s:5:"1.3.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2005-03-06";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:40:"Bugs correction (2475, 2488, 2135, 2176)";}i:2;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"1.2";s:3:"api";s:3:"1.2";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2004-05-08";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:71:"Add support for other separator than the space char and bug correction";}i:3;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"1.1";s:3:"api";s:3:"1.1";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2003-05-28";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:141:"* Add support for BZ2 compression * Add support for add and extract without using temporary files : methods addString() and extractInString()";}i:4;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"1.0";s:3:"api";s:3:"1.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2003-01-24";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:23:"Change status to stable";}i:5;a:5:{s:7:"version";a:2:{s:7:"release";s:7:"0.10-b1";s:3:"api";s:7:"0.10-b1";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2003-01-08";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:59:"Add support for long filenames (greater than 99 characters)";}i:6;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"0.9";s:3:"api";s:3:"0.9";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2002-05-27";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:25:"Auto-detect gzip'ed files";}i:7;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"0.4";s:3:"api";s:3:"0.4";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2002-05-20";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:51:"Windows bugfix: use forward slashes inside archives";}i:8;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"0.2";s:3:"api";s:3:"0.2";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2002-02-18";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:29:"From initial commit to stable";}i:9;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"0.3";s:3:"api";s:3:"0.3";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2002-04-13";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:47:"Windows bugfix: used wrong directory separators";}}}s:8:"filelist";a:2:{s:15:"Archive/Tar.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"06409d39f4268a9aa9e2924c7f397a38";s:4:"name";s:15:"Archive/Tar.php";s:4:"role";s:3:"php";s:12:"installed_as";s:54:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Archive\Tar.php";}s:20:"docs/Archive_Tar.txt";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"29b03715377b18b1fafcff98a99cc9a7";s:4:"name";s:20:"docs/Archive_Tar.txt";s:4:"role";s:3:"doc";s:12:"installed_as";s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Archive_Tar\docs\Archive_Tar.txt";}}s:12:"_lastversion";s:5:"1.3.2";s:7:"dirtree";a:4:{s:46:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Archive";b:1;s:46:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\Archive";b:1;s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Archive_Tar\docs";b:1;s:60:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\Archive_Tar\docs";b:1;}s:3:"old";a:7:{s:7:"version";s:5:"1.3.2";s:12:"release_date";s:10:"2007-01-03";s:13:"release_state";s:6:"stable";s:15:"release_license";s:11:"PHP License";s:13:"release_notes";s:485:"Correct Bug #4016 Remove duplicate remove error display with '@' Correct Bug #3909 : Check existence of OS_WINDOWS constant Correct Bug #5452 fix for "lone zero block" when untarring packages Change filemode (from pear-core/Archive/Tar.php v.1.21) Correct Bug #6486 Can not extract symlinks Correct Bug #6933 Archive_Tar (Tar file management class) Directory traversal Correct Bug #8114 Files added on-the-fly not storing date Correct Bug #9352 Bug on _dirCheck function over nfs path";s:12:"release_deps";a:2:{i:0;a:4:{s:4:"type";s:3:"php";s:3:"rel";s:2:"ge";s:7:"version";s:5:"4.0.0";s:8:"optional";s:2:"no";}i:1;a:6:{s:4:"type";s:3:"pkg";s:7:"channel";s:12:"pear.php.net";s:4:"name";s:4:"PEAR";s:3:"rel";s:2:"ge";s:7:"version";s:7:"1.4.0b1";s:8:"optional";s:2:"no";}}s:11:"maintainers";a:3:{i:0;a:5:{s:4:"name";s:14:"Gregory Beaver";s:5:"email";s:14:"cellog@php.net";s:6:"active";s:3:"yes";s:6:"handle";s:6:"cellog";s:4:"role";s:4:"lead";}i:1;a:5:{s:4:"name";s:14:"Vincent Blavet";s:5:"email";s:22:"vincent@phpconcept.net";s:6:"active";s:2:"no";s:6:"handle";s:7:"vblavet";s:4:"role";s:4:"lead";}i:2;a:5:{s:4:"name";s:11:"Stig Bakken";s:5:"email";s:12:"stig@php.net";s:6:"active";s:2:"no";s:6:"handle";s:3:"ssb";s:4:"role";s:6:"helper";}}}s:10:"xsdversion";s:3:"2.0";s:13:"_lastmodified";i:1171608472;}catalog/libs/PEAR/.registry/console_getopt.reg0000644577340101002240000000441710625427731023323 0ustar tonerlogicspg11675700000000000000a:17:{s:8:"provides";a:0:{}s:8:"filelist";a:1:{s:18:"Console/Getopt.php";a:3:{s:4:"role";s:3:"php";s:6:"md5sum";s:32:"99ed4904b93b15a81ea9c8566c3ffc78";s:12:"installed_as";s:57:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Console\Getopt.php";}}s:10:"xsdversion";s:3:"1.0";s:15:"packagerversion";s:5:"1.4.9";s:7:"package";s:14:"Console_Getopt";s:7:"summary";s:26:"Command-line option parser";s:11:"description";s:83:"This is a PHP implementation of "getopt" supporting both short and long options. ";s:11:"maintainers";a:3:{i:0;a:4:{s:6:"handle";s:6:"andrei";s:4:"name";s:15:"Andrei Zmievski";s:5:"email";s:14:"andrei@php.net";s:4:"role";s:4:"lead";}i:1;a:4:{s:6:"handle";s:3:"ssb";s:4:"name";s:11:"Stig Bakken";s:5:"email";s:12:"stig@php.net";s:4:"role";s:9:"developer";}i:2;a:4:{s:6:"handle";s:6:"cellog";s:4:"name";s:11:"Greg Beaver";s:5:"email";s:14:"cellog@php.net";s:4:"role";s:6:"helper";}}s:7:"version";s:5:"1.2.1";s:12:"release_date";s:10:"2006-12-08";s:15:"release_license";s:11:"PHP License";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:130:"Fixed bugs #4448 (Long parameter values truncated with longoption parameter) and #7444 (Trailing spaces after php closing tag) ";s:9:"changelog";a:5:{i:0;a:4:{s:7:"version";s:3:"1.2";s:12:"release_date";s:10:"2003-12-11";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:75:"Fix to preserve BC with 1.0 and allow correct behaviour for new users ";}i:1;a:4:{s:7:"version";s:3:"1.0";s:12:"release_date";s:10:"2002-09-13";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:20:"Stable release ";}i:2;a:4:{s:7:"version";s:4:"0.11";s:12:"release_date";s:10:"2002-05-26";s:13:"release_state";s:4:"beta";s:13:"release_notes";s:95:"POSIX getopt compatibility fix: treat first element of args array as command name ";}i:3;a:4:{s:7:"version";s:4:"0.10";s:12:"release_date";s:10:"2002-05-12";s:13:"release_state";s:4:"beta";s:13:"release_notes";s:19:"Packaging fix ";}i:4;a:4:{s:7:"version";s:3:"0.9";s:12:"release_date";s:10:"2002-05-12";s:13:"release_state";s:4:"beta";s:13:"release_notes";s:21:"Initial release ";}}s:12:"_lastversion";s:5:"1.2.1";s:7:"dirtree";a:2:{s:46:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Console";b:1;s:46:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\Console";b:1;}s:13:"_lastmodified";i:1171608473;}catalog/libs/PEAR/.registry/html_template_it.reg0000644577340101002240000004362310625427732023635 0ustar tonerlogicspg11675700000000000000a:17:{s:8:"provides";a:44:{s:22:"class;HTML_Template_IT";a:3:{s:4:"type";s:5:"class";s:4:"name";s:16:"HTML_Template_IT";s:8:"explicit";b:1;}s:36:"function;HTML_Template_IT::setOption";a:3:{s:4:"type";s:8:"function";s:4:"name";s:27:"HTML_Template_IT::setOption";s:8:"explicit";b:1;}s:37:"function;HTML_Template_IT::setOptions";a:3:{s:4:"type";s:8:"function";s:4:"name";s:28:"HTML_Template_IT::setOptions";s:8:"explicit";b:1;}s:31:"function;HTML_Template_IT::show";a:3:{s:4:"type";s:8:"function";s:4:"name";s:22:"HTML_Template_IT::show";s:8:"explicit";b:1;}s:30:"function;HTML_Template_IT::get";a:3:{s:4:"type";s:8:"function";s:4:"name";s:21:"HTML_Template_IT::get";s:8:"explicit";b:1;}s:32:"function;HTML_Template_IT::parse";a:3:{s:4:"type";s:8:"function";s:4:"name";s:23:"HTML_Template_IT::parse";s:8:"explicit";b:1;}s:44:"function;HTML_Template_IT::parseCurrentBlock";a:3:{s:4:"type";s:8:"function";s:4:"name";s:35:"HTML_Template_IT::parseCurrentBlock";s:8:"explicit";b:1;}s:38:"function;HTML_Template_IT::setVariable";a:3:{s:4:"type";s:8:"function";s:4:"name";s:29:"HTML_Template_IT::setVariable";s:8:"explicit";b:1;}s:42:"function;HTML_Template_IT::setCurrentBlock";a:3:{s:4:"type";s:8:"function";s:4:"name";s:33:"HTML_Template_IT::setCurrentBlock";s:8:"explicit";b:1;}s:37:"function;HTML_Template_IT::touchBlock";a:3:{s:4:"type";s:8:"function";s:4:"name";s:28:"HTML_Template_IT::touchBlock";s:8:"explicit";b:1;}s:31:"function;HTML_Template_IT::init";a:3:{s:4:"type";s:8:"function";s:4:"name";s:22:"HTML_Template_IT::init";s:8:"explicit";b:1;}s:31:"function;HTML_Template_IT::free";a:3:{s:4:"type";s:8:"function";s:4:"name";s:22:"HTML_Template_IT::free";s:8:"explicit";b:1;}s:38:"function;HTML_Template_IT::setTemplate";a:3:{s:4:"type";s:8:"function";s:4:"name";s:29:"HTML_Template_IT::setTemplate";s:8:"explicit";b:1;}s:43:"function;HTML_Template_IT::loadTemplatefile";a:3:{s:4:"type";s:8:"function";s:4:"name";s:34:"HTML_Template_IT::loadTemplatefile";s:8:"explicit";b:1;}s:34:"function;HTML_Template_IT::setRoot";a:3:{s:4:"type";s:8:"function";s:4:"name";s:25:"HTML_Template_IT::setRoot";s:8:"explicit";b:1;}s:49:"function;HTML_Template_IT::buildBlockvariablelist";a:3:{s:4:"type";s:8:"function";s:4:"name";s:40:"HTML_Template_IT::buildBlockvariablelist";s:8:"explicit";b:1;}s:45:"function;HTML_Template_IT::getGlobalvariables";a:3:{s:4:"type";s:8:"function";s:4:"name";s:36:"HTML_Template_IT::getGlobalvariables";s:8:"explicit";b:1;}s:37:"function;HTML_Template_IT::findBlocks";a:3:{s:4:"type";s:8:"function";s:4:"name";s:28:"HTML_Template_IT::findBlocks";s:8:"explicit";b:1;}s:34:"function;HTML_Template_IT::getFile";a:3:{s:4:"type";s:8:"function";s:4:"name";s:25:"HTML_Template_IT::getFile";s:8:"explicit";b:1;}s:39:"function;HTML_Template_IT::errorMessage";a:3:{s:4:"type";s:8:"function";s:4:"name";s:30:"HTML_Template_IT::errorMessage";s:8:"explicit";b:1;}s:23:"class;HTML_Template_ITX";a:4:{s:4:"type";s:5:"class";s:4:"name";s:17:"HTML_Template_ITX";s:7:"extends";s:16:"HTML_Template_IT";s:8:"explicit";b:1;}s:32:"function;HTML_Template_ITX::init";a:3:{s:4:"type";s:8:"function";s:4:"name";s:23:"HTML_Template_ITX::init";s:8:"explicit";b:1;}s:40:"function;HTML_Template_ITX::replaceBlock";a:3:{s:4:"type";s:8:"function";s:4:"name";s:31:"HTML_Template_ITX::replaceBlock";s:8:"explicit";b:1;}s:44:"function;HTML_Template_ITX::replaceBlockfile";a:3:{s:4:"type";s:8:"function";s:4:"name";s:35:"HTML_Template_ITX::replaceBlockfile";s:8:"explicit";b:1;}s:36:"function;HTML_Template_ITX::addBlock";a:3:{s:4:"type";s:8:"function";s:4:"name";s:27:"HTML_Template_ITX::addBlock";s:8:"explicit";b:1;}s:40:"function;HTML_Template_ITX::addBlockfile";a:3:{s:4:"type";s:8:"function";s:4:"name";s:31:"HTML_Template_ITX::addBlockfile";s:8:"explicit";b:1;}s:45:"function;HTML_Template_ITX::placeholderExists";a:3:{s:4:"type";s:8:"function";s:4:"name";s:36:"HTML_Template_ITX::placeholderExists";s:8:"explicit";b:1;}s:43:"function;HTML_Template_ITX::performCallback";a:3:{s:4:"type";s:8:"function";s:4:"name";s:34:"HTML_Template_ITX::performCallback";s:8:"explicit";b:1;}s:44:"function;HTML_Template_ITX::getFunctioncalls";a:3:{s:4:"type";s:8:"function";s:4:"name";s:35:"HTML_Template_ITX::getFunctioncalls";s:8:"explicit";b:1;}s:46:"function;HTML_Template_ITX::setFunctioncontent";a:3:{s:4:"type";s:8:"function";s:4:"name";s:37:"HTML_Template_ITX::setFunctioncontent";s:8:"explicit";b:1;}s:47:"function;HTML_Template_ITX::setCallbackFunction";a:3:{s:4:"type";s:8:"function";s:4:"name";s:38:"HTML_Template_ITX::setCallbackFunction";s:8:"explicit";b:1;}s:51:"function;HTML_Template_ITX::setCallbackFuntiontable";a:3:{s:4:"type";s:8:"function";s:4:"name";s:42:"HTML_Template_ITX::setCallbackFuntiontable";s:8:"explicit";b:1;}s:43:"function;HTML_Template_ITX::removeBlockData";a:3:{s:4:"type";s:8:"function";s:4:"name";s:34:"HTML_Template_ITX::removeBlockData";s:8:"explicit";b:1;}s:40:"function;HTML_Template_ITX::getBlocklist";a:3:{s:4:"type";s:8:"function";s:4:"name";s:31:"HTML_Template_ITX::getBlocklist";s:8:"explicit";b:1;}s:39:"function;HTML_Template_ITX::blockExists";a:3:{s:4:"type";s:8:"function";s:4:"name";s:30:"HTML_Template_ITX::blockExists";s:8:"explicit";b:1;}s:45:"function;HTML_Template_ITX::getBlockvariables";a:3:{s:4:"type";s:8:"function";s:4:"name";s:36:"HTML_Template_ITX::getBlockvariables";s:8:"explicit";b:1;}s:47:"function;HTML_Template_ITX::BlockvariableExists";a:3:{s:4:"type";s:8:"function";s:4:"name";s:38:"HTML_Template_ITX::BlockvariableExists";s:8:"explicit";b:1;}s:45:"function;HTML_Template_ITX::buildFunctionlist";a:3:{s:4:"type";s:8:"function";s:4:"name";s:36:"HTML_Template_ITX::buildFunctionlist";s:8:"explicit";b:1;}s:36:"function;HTML_Template_ITX::getValue";a:3:{s:4:"type";s:8:"function";s:4:"name";s:27:"HTML_Template_ITX::getValue";s:8:"explicit";b:1;}s:55:"function;HTML_Template_ITX::deleteFromBlockvariablelist";a:3:{s:4:"type";s:8:"function";s:4:"name";s:46:"HTML_Template_ITX::deleteFromBlockvariablelist";s:8:"explicit";b:1;}s:51:"function;HTML_Template_ITX::updateBlockvariablelist";a:3:{s:4:"type";s:8:"function";s:4:"name";s:42:"HTML_Template_ITX::updateBlockvariablelist";s:8:"explicit";b:1;}s:49:"function;HTML_Template_ITX::findPlaceholderBlocks";a:3:{s:4:"type";s:8:"function";s:4:"name";s:40:"HTML_Template_ITX::findPlaceholderBlocks";s:8:"explicit";b:1;}s:35:"function;HTML_Template_ITX::warning";a:3:{s:4:"type";s:8:"function";s:4:"name";s:26:"HTML_Template_ITX::warning";s:8:"explicit";b:1;}s:14:"class;IT_Error";a:4:{s:4:"type";s:5:"class";s:4:"name";s:8:"IT_Error";s:7:"extends";s:10:"PEAR_Error";s:8:"explicit";b:1;}}s:8:"filelist";a:23:{s:6:"IT.php";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"5b034e239aff955692281191318754e4";s:12:"installed_as";s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\HTML\Template\IT.php";}s:7:"ITX.php";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"3dd802be714a2366531c89933da23a04";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\HTML\Template\ITX.php";}s:12:"IT_Error.php";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"347113315197afdc4ba98815a21f14ab";s:12:"installed_as";s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\HTML\Template\IT_Error.php";}s:7:"LICENSE";a:4:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"f8790e48b597dff12a643e08e9be3fab";s:12:"installed_as";s:68:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\LICENSE";}s:29:"tests/templates/addblock.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"e50de49b74a1d96bb77ddae2d0abdfc3";s:12:"installed_as";s:91:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\addblock.html";}s:35:"tests/templates/blockiteration.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"22e56437378e53d08ba07d3dd2aa4b85";s:12:"installed_as";s:97:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\blockiteration.html";}s:27:"tests/templates/blocks.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"4173bf97eec43787532e247ef9b2611a";s:12:"installed_as";s:89:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\blocks.html";}s:28:"tests/templates/globals.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"2611d6ec574a65716f1bc2ca95cb8c63";s:12:"installed_as";s:90:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\globals.html";}s:30:"tests/templates/__include.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"310552db4653b34dbb0f993847572fc5";s:12:"installed_as";s:92:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\__include.html";}s:28:"tests/templates/include.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"db5b226eff0218c831749c07042529f2";s:12:"installed_as";s:90:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\include.html";}s:37:"tests/templates/loadtemplatefile.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"d9a6425eebdfc6981465b4a228dbee51";s:12:"installed_as";s:99:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\loadtemplatefile.html";}s:33:"tests/templates/replaceblock.html";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"5c7e2e9c32306db4b6667d2b57f1c0ac";s:12:"installed_as";s:95:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates\replaceblock.html";}s:30:"tests/Console_TestListener.php";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"9bd9d964363904b5026972dff0d198da";s:12:"installed_as";s:92:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\Console_TestListener.php";}s:25:"tests/IT_api_testcase.php";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"e624be47a36948a1e44d231260de808a";s:12:"installed_as";s:87:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\IT_api_testcase.php";}s:27:"tests/IT_usage_testcase.php";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"3836b3fc1dd5a2a4d09258be575736c9";s:12:"installed_as";s:89:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\IT_usage_testcase.php";}s:26:"tests/ITX_api_testcase.php";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"8def35e6dae4a5db15ec026bc616a3d3";s:12:"installed_as";s:88:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\ITX_api_testcase.php";}s:28:"tests/ITX_usage_testcase.php";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"ec630d63df8163f75c4aa3b1e3051d2d";s:12:"installed_as";s:90:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\ITX_usage_testcase.php";}s:14:"tests/test.php";a:4:{s:4:"role";s:4:"test";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"7a2c8eab843daf1cb9acebfd7fa5913d";s:12:"installed_as";s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\test.php";}s:22:"examples/sample_it.php";a:4:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"ba285cf25750a900690f2388ee31a103";s:12:"installed_as";s:83:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\examples\sample_it.php";}s:36:"examples/sample_itx_addblockfile.php";a:4:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"4b2a932053e321a0cf9ced5295113f09";s:12:"installed_as";s:97:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\examples\sample_itx_addblockfile.php";}s:31:"examples/templates/main.tpl.htm";a:4:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"834e1e6d40b2f34906aa17f9969bd891";s:12:"installed_as";s:92:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\examples\templates\main.tpl.htm";}s:44:"examples/templates/addblockfile_list.tpl.htm";a:4:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"342278cc5fe8ca6c66591cd5ee389402";s:12:"installed_as";s:105:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\examples\templates\addblockfile_list.tpl.htm";}s:44:"examples/templates/addblockfile_main.tpl.htm";a:4:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:13:"HTML/Template";s:6:"md5sum";s:32:"697f694a67db6b96d247a24bdfd44f9b";s:12:"installed_as";s:105:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\examples\templates\addblockfile_main.tpl.htm";}}s:10:"xsdversion";s:3:"1.0";s:15:"packagerversion";s:5:"1.4.9";s:7:"package";s:16:"HTML_Template_IT";s:7:"summary";s:20:"Integrated Templates";s:11:"description";s:1198:"HTML_Template_IT: Simple template API. The Isotemplate API is somewhat tricky for a beginner although it is the best one you can build. template::parse() [phplib template = Isotemplate] requests you to name a source and a target where the current block gets parsed into. Source and target can be block names or even handler names. This API gives you a maximum of fexibility but you always have to know what you do which is quite unusual for php skripter like me. I noticed that I do not any control on which block gets parsed into which one. If all blocks are within one file, the script knows how they are nested and in which way you have to parse them. IT knows that inner1 is a child of block2, there's no need to tell him about this. Features : * Nested blocks * Include external file * Custom tags format (default {mytag}) HTML_Template_ITX : With this class you get the full power of the phplib template class. You may have one file with blocks in it but you have as well one main file and multiple files one for each block. This is quite usefull when you have user configurable websites. Using blocks not in the main template allows you to modify some parts of your layout easily. ";s:11:"maintainers";a:3:{i:0;a:4:{s:6:"handle";s:2:"uw";s:4:"name";s:10:"Ulf Wendel";s:5:"email";s:20:"ulf.wendel@phpdoc.de";s:4:"role";s:9:"developer";}i:1;a:4:{s:6:"handle";s:6:"pajoye";s:4:"name";s:17:"Pierre-Alain Joye";s:5:"email";s:14:"pajoye@php.net";s:4:"role";s:4:"lead";}i:2;a:4:{s:6:"handle";s:3:"dsp";s:4:"name";s:17:"David Soria Parra";s:5:"email";s:11:"dsp@php.net";s:4:"role";s:4:"lead";}}s:7:"version";s:5:"1.2.1";s:12:"release_date";s:10:"2006-08-25";s:15:"release_license";s:20:"Modified BSD license";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:369:"- Deprecate $callbackobject parameter in setCallbackFunction - Introduce $expandCallbackParameters parameter to setCallbackFunction to support callbacks that expect to get the parameters in a regular way, not as an array - #7651, allow dots in placeholder and block names - #7611, wrong array initialized, the same object cannot be used for multiple templates ";s:9:"changelog";a:7:{i:0;a:4:{s:7:"version";s:5:"1.2.0";s:12:"release_date";s:10:"2006-08-17";s:13:"release_state";s:4:"beta";s:13:"release_notes";s:280:"- Deprecate $callbackobject parameter in setCallbackFunction - Introduce $expandCallbackParameters parameter to setCallbackFunction to support callbacks that expect to get the parameters in a regular way, not as an array - #7651, allow dots in placeholder and block names ";}i:1;a:4:{s:7:"version";s:5:"1.1.5";s:12:"release_date";s:10:"2006-06-13";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:95:"- #7611, wrong array initialized, the same object cannot be used for multiple templates ";}i:2;a:4:{s:7:"version";s:5:"1.1.4";s:12:"release_date";s:10:"2006-04-12";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:215:"- #6084, fread raises warning when used with empty files - #7359, remove notices when a block is not yet defined - fix a bug introduced with some cleanup commit, in some cases, callbacks did not work anymore ";}i:3;a:4:{s:7:"version";s:5:"1.1.3";s:12:"release_date";s:10:"2005-11-01";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:96:"- Change to the new BSD License (see http://www.opensource.org/licenses/bsd-license.php) ";}i:4;a:4:{s:7:"version";s:5:"1.1.2";s:12:"release_date";s:10:"2005-10-28";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:254:"- Comply better with the coding standards (dufuz@php.net) - Fixed Bug #5774 ITX->buildFunctionlist, forced to use {} as delimiters instead of the user defined once (dufuz@php.net) - Fixed Bug #5642 Undefined variable: blockname (dufuz@php.net) ";}i:5;a:4:{s:7:"version";s:5:"1.1.1";s:12:"release_date";s:10:"2003-08-21";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:167:"- fix #4590, case sensitive method name getFile fix - fix #1453, haltOnWarning fix, wrong property name called - fix #3952, return IT_OK on success in setOptions ";}i:6;a:4:{s:7:"version";s:3:"1.1";s:12:"release_date";s:10:"2003-03-11";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:21:"*BETA* release. ";}}s:12:"_lastversion";s:5:"1.2.1";s:7:"dirtree";a:12:{s:52:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\HTML\Template";b:1;s:52:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\HTML\Template";b:1;s:43:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\HTML";b:1;s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT";b:1;s:77:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests\templates";b:1;s:77:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\tests\HTML_Template_IT\tests\templates";b:1;s:67:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\tests\HTML_Template_IT\tests";b:1;s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\HTML_Template_IT\tests";b:1;s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\examples";b:1;s:69:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\HTML_Template_IT\examples";b:1;s:79:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\HTML_Template_IT\examples\templates";b:1;s:79:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\HTML_Template_IT\examples\templates";b:1;}s:13:"_lastmodified";i:1171608479;}catalog/libs/PEAR/.registry/mdb2.reg0000644577340101002240000024733610625427740021134 0ustar tonerlogicspg11675700000000000000a:26:{s:7:"attribs";a:6:{s:15:"packagerversion";s:6:"1.4.11";s:7:"version";s:3:"2.0";s:5:"xmlns";s:35:"http://pear.php.net/dtd/package-2.0";s:11:"xmlns:tasks";s:33:"http://pear.php.net/dtd/tasks-1.0";s:9:"xmlns:xsi";s:41:"http://www.w3.org/2001/XMLSchema-instance";s:18:"xsi:schemaLocation";s:147:"http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd";}s:4:"name";s:4:"MDB2";s:7:"channel";s:12:"pear.php.net";s:7:"extends";s:3:"MDB";s:7:"summary";s:26:"database abstraction layer";s:11:"description";s:1379:"PEAR MDB2 is a merge of the PEAR DB and Metabase php database abstraction layers. It provides a common API for all supported RDBMS. The main difference to most other DB abstraction packages is that MDB2 goes much further to ensure portability. MDB2 provides most of its many features optionally that can be used to construct portable SQL statements: * Object-Oriented API * A DSN (data source name) or array format for specifying database servers * Datatype abstraction and on demand datatype conversion * Various optional fetch modes to fix portability issues * Portable error codes * Sequential and non sequential row fetching as well as bulk fetching * Ability to make buffered and unbuffered queries * Ordered array and associative array for the fetched rows * Prepare/execute (bind) named and unnamed placeholder emulation * Sequence/autoincrement emulation * Replace emulation * Limited sub select emulation * Row limit emulation * Transactions/savepoint support * Large Object support * Index/Unique Key/Primary Key support * Pattern matching abstraction * Module framework to load advanced functionality on demand * Ability to read the information schema * RDBMS management methods (creating, dropping, altering) * Reverse engineering schemas from an existing database * SQL function call abstraction * Full integration into the PEAR Framework * PHPDoc API documentation";s:4:"lead";a:4:{s:4:"name";s:17:"Lukas Kahwe Smith";s:4:"user";s:6:"lsmith";s:5:"email";s:20:"smith@pooteeweet.org";s:6:"active";s:3:"yes";}s:9:"developer";a:4:{s:4:"name";s:16:"Lorenzo Alberton";s:4:"user";s:5:"quipo";s:5:"email";s:19:"l.alberton@quipo.it";s:6:"active";s:3:"yes";}s:11:"contributor";a:4:{s:4:"name";s:11:"Paul Cooper";s:4:"user";s:3:"pgc";s:5:"email";s:14:"pgc@ucecom.com";s:6:"active";s:3:"yes";}s:6:"helper";a:2:{i:0;a:4:{s:4:"name";s:16:"Daniel Convissor";s:4:"user";s:7:"danielc";s:5:"email";s:15:"danielc@php.net";s:6:"active";s:3:"yes";}i:1;a:4:{s:4:"name";s:14:"David Coallier";s:4:"user";s:6:"davidc";s:5:"email";s:17:"david@jaws.com.mx";s:6:"active";s:3:"yes";}}s:4:"date";s:10:"2006-11-03";s:4:"time";s:8:"14:04:30";s:7:"version";a:2:{s:7:"release";s:5:"2.3.0";s:3:"api";s:5:"2.3.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:7:"license";s:11:"BSD License";s:5:"notes";s:3085:"- added charset and collation support to field declaration - added SQL comments and quoted identifier handling inside prepared statement parser - expanded length/scale support for numeric types (Request #7170) - added statement_format option to make it possible to define the name used for native statements if supported - fixed bug when setting MDB2_PREPARE_RESULT in autoExecute() - fixed notice in exec() call in autoExecute() - reversed if logic in MDB2::fileExists checking to be more fool proof with safe_mode restrictions (Bug #8296) - moved CREATE TABLE query generation in a separate method for reuse in the drivers - added testLOBRead to test multiple LOB reads - fixed getColumnNames() optional parameter handling (Bug #8857) - phpdoc fix for fetchCol/fetchAll - added an extra if in the autoExecute method of the Extended driver (Bug #8878) - expanded tableInfo() tests - expanded prepare() tests - fix the incorrect use of currID() for lastInsertID() emulation (Bug #9107) - add test for lastInsertID() - also output php version in test results - added supported 'new_link' - dropped use of track_errors because 5.2.0 causes php_errormsg to not get populated if a custom error handler is set and it was causing issues for safe_mode users anyways - added some error handling into the bindValues()/bindParams() methods (Bug #9133) - bindValue() does not need values by reference - fix issue in execute() when parameter is a scalar integer of 0 (Bug #9158) - implemented stream_stat() method (Bug #9092) - better deal with non scalar arguments in test helper function as 5.2.0 explodes otherwise - extracted _skipDelimitedStrings() method from prepare() - added test for _skipDelimitedStrings() method - migrated to package.xml version 2 open todo items: - handle autoincrement fields in alterTable() - add length handling to LOB reverse engineering - expand charset support in schema management and result set handling (Request #4666) - add EXPLAIN abstraction - add cursor support along the lines of PDO (Request #3660 etc.) - add PDO based drivers, especially a driver to support SQLite 3 (Request #6907) - add support to export/import in CSV format - add more functions to the Function module (MD5(), IFNULL(), LENGTH() etc.) - add support for database/table/row LOCKs - add support for FOREIGN KEYs and CHECK (ENUM as possible mysql fallback) constraints - generate STATUS file from test suite results and allow users to submit test results - explore use of install groups (pear install MDB2#mysql) - add support for full text index creation and querying - add tests to check if the RDBMS specific handling with portability options disabled behaves as expected - handle implicit commits (like for DDL) in any affected driver (mysql, sqlite..) - add a getTableFieldsDefinitions() method to be used in tableInfo() - drop ILIKE from matchPattern() and instead add a second parameter to handle case sensitivity with arbitrary operators - add charset and collation support to field declaration in all drivers - handle LOBs in buffered result sets (Request #8793)";s:8:"contents";a:1:{s:3:"dir";a:2:{s:7:"attribs";a:2:{s:14:"baseinstalldir";s:1:"/";s:4:"name";s:1:"/";}s:4:"file";a:42:{i:0;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"b5cd8d01a36258caa0c4eb7e3478c219";s:4:"name";s:25:"docs/examples/example.php";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:1;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"9d111ec2aec184bc1ece351aa7a59aaa";s:4:"name";s:30:"docs/examples/example_php5.php";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:2;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"74b2bb45de61eccbffed7d75d5268af9";s:4:"name";s:37:"docs/examples/metapear_test_db.schema";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:3;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a253b37e185622112acfef6c94b79aef";s:4:"name";s:17:"docs/CONTRIBUTORS";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:4;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"cc1befe78146094be02f89bbb201b4ab";s:4:"name";s:19:"docs/datatypes.html";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:5;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a70b17bcd8e56911f74a4dff61a3ff8d";s:4:"name";s:16:"docs/MAINTAINERS";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:6;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"c7b68ea23aa2ae6d91913703a2246f15";s:4:"name";s:11:"docs/README";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:7;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"f9858c9327499e60db66621a817c66a4";s:4:"name";s:11:"docs/STATUS";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:8;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ec0c4383ddfd3af69d577344d0d5b4dd";s:4:"name";s:9:"docs/TODO";s:4:"role";s:3:"doc";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:9;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"8d10cb404138fb05c577d040a34dc566";s:4:"name";s:31:"MDB2/Driver/Datatype/Common.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:10;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"97bebd544d4da9b698fb40dfc9b5835d";s:4:"name";s:31:"MDB2/Driver/Function/Common.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:11;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ef96fac9e21f7b0d875fcd6019e83d76";s:4:"name";s:30:"MDB2/Driver/Manager/Common.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:12;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"005901a0e84f6ff717e0847f0a3faf14";s:4:"name";s:29:"MDB2/Driver/Native/Common.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:13;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"046ccbeb045bfa0f6e657d4bf5ea98f2";s:4:"name";s:30:"MDB2/Driver/Reverse/Common.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:14;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"af81dd360b2d2d09f8c978214b06a553";s:4:"name";s:13:"MDB2/Date.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:15;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"62a14a62f64ad91e54f055a4da3cd5e3";s:4:"name";s:17:"MDB2/Extended.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:16;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"023c4bda6db2d8f277d8d3c76dc8f850";s:4:"name";s:17:"MDB2/Iterator.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:17;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"f3cefd7b2f7a1d5ac52a537aa2bdc495";s:4:"name";s:12:"MDB2/LOB.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:18;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"01d41e566bdb62c7bcb432c8039dda9a";s:4:"name";s:16:"tests/basic.phpt";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:19;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"6f322088ba70dd591a2cff31bf446525";s:4:"name";s:17:"tests/clitest.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:20;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"c90cdd55233d9ef470150c06a946d213";s:4:"name";s:16:"tests/config.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:21;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"2a2c534ab4afb0c05ca9d7ca47815bf5";s:4:"name";s:30:"tests/Console_TestListener.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:22;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"d46a8f267dbd54f0c7ff55e479d33e7e";s:4:"name";s:27:"tests/HTML_TestListener.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:23;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"98da3f3aba98f4a9adc71a9fd19929de";s:4:"name";s:27:"tests/MDB2_api_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:24;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"6f5ca4adb851f22a41f84bd7be1d9b4d";s:4:"name";s:28:"tests/MDB2_bugs_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:25;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"f8534befe37efc7f35beb0897b75f951";s:4:"name";s:27:"tests/MDB2_Connect_Test.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:26;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"593ff9ad532908f16d020ceaa9ab09f8";s:4:"name";s:32:"tests/MDB2_datatype_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:27;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"be04baf42175f7bfc55412a08744c4e9";s:4:"name";s:32:"tests/MDB2_extended_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:28;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ca4ad92dd091bc59b0f0be14b8cfdc0c";s:4:"name";s:32:"tests/MDB2_function_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:29;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"edb864169081c5b6a2d9b6d5e2f28e83";s:4:"name";s:31:"tests/MDB2_manager_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:30;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"22be0efc5b2b81bd6cd6ebe31747445e";s:4:"name";s:30:"tests/MDB2_native_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:31;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"6b283c945b2dea2d375aa390087b658d";s:4:"name";s:31:"tests/MDB2_reverse_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:32;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"2d4098056e3e1eb2ab73e5803d51c136";s:4:"name";s:23:"tests/MDB2_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:33;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"03db646e093383e77f98454ea0876225";s:4:"name";s:29:"tests/MDB2_usage_testcase.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:34;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"7a13f2bc2d431c365f838d12e7259ec6";s:4:"name";s:12:"tests/README";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:35;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a2c50ccea24f7bdd5439b366608d59d5";s:4:"name";s:14:"tests/test.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:36;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"dc05c6cc4540981d350ccac2005c2578";s:4:"name";s:20:"tests/testchoose.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:37;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"3c4d2c9d89398c5692d36299d98f9c6e";s:4:"name";s:15:"tests/tests.css";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:38;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"841447ae8672a6779166791d0bf6ec03";s:4:"name";s:19:"tests/testUtils.php";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:39;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"c9e7116ea8cad94ec69fa9a5e4d195a6";s:4:"name";s:25:"tests/test_setup.php.dist";s:4:"role";s:4:"test";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}i:40;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a5019765abfd14334f25231c61c568ef";s:4:"name";s:7:"LICENSE";s:4:"role";s:4:"data";}}i:41;a:2:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ae732f6b7abdd7e1246e8112abc91ae6";s:4:"name";s:8:"MDB2.php";s:4:"role";s:3:"php";}s:13:"tasks:replace";a:1:{s:7:"attribs";a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}}}}}s:12:"dependencies";a:1:{s:8:"required";a:3:{s:3:"php";a:1:{s:3:"min";s:5:"4.3.2";}s:13:"pearinstaller";a:1:{s:3:"min";s:7:"1.4.0b1";}s:7:"package";a:3:{s:4:"name";s:4:"PEAR";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.3.6";}}}s:10:"phprelease";s:0:"";s:9:"changelog";a:1:{s:7:"release";a:21:{i:0;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.3.0";s:3:"api";s:5:"2.3.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-11-03";s:7:"license";s:11:"BSD License";s:5:"notes";s:3085:"- added charset and collation support to field declaration - added SQL comments and quoted identifier handling inside prepared statement parser - expanded length/scale support for numeric types (Request #7170) - added statement_format option to make it possible to define the name used for native statements if supported - fixed bug when setting MDB2_PREPARE_RESULT in autoExecute() - fixed notice in exec() call in autoExecute() - reversed if logic in MDB2::fileExists checking to be more fool proof with safe_mode restrictions (Bug #8296) - moved CREATE TABLE query generation in a separate method for reuse in the drivers - added testLOBRead to test multiple LOB reads - fixed getColumnNames() optional parameter handling (Bug #8857) - phpdoc fix for fetchCol/fetchAll - added an extra if in the autoExecute method of the Extended driver (Bug #8878) - expanded tableInfo() tests - expanded prepare() tests - fix the incorrect use of currID() for lastInsertID() emulation (Bug #9107) - add test for lastInsertID() - also output php version in test results - added supported 'new_link' - dropped use of track_errors because 5.2.0 causes php_errormsg to not get populated if a custom error handler is set and it was causing issues for safe_mode users anyways - added some error handling into the bindValues()/bindParams() methods (Bug #9133) - bindValue() does not need values by reference - fix issue in execute() when parameter is a scalar integer of 0 (Bug #9158) - implemented stream_stat() method (Bug #9092) - better deal with non scalar arguments in test helper function as 5.2.0 explodes otherwise - extracted _skipDelimitedStrings() method from prepare() - added test for _skipDelimitedStrings() method - migrated to package.xml version 2 open todo items: - handle autoincrement fields in alterTable() - add length handling to LOB reverse engineering - expand charset support in schema management and result set handling (Request #4666) - add EXPLAIN abstraction - add cursor support along the lines of PDO (Request #3660 etc.) - add PDO based drivers, especially a driver to support SQLite 3 (Request #6907) - add support to export/import in CSV format - add more functions to the Function module (MD5(), IFNULL(), LENGTH() etc.) - add support for database/table/row LOCKs - add support for FOREIGN KEYs and CHECK (ENUM as possible mysql fallback) constraints - generate STATUS file from test suite results and allow users to submit test results - explore use of install groups (pear install MDB2#mysql) - add support for full text index creation and querying - add tests to check if the RDBMS specific handling with portability options disabled behaves as expected - handle implicit commits (like for DDL) in any affected driver (mysql, sqlite..) - add a getTableFieldsDefinitions() method to be used in tableInfo() - drop ILIKE from matchPattern() and instead add a second parameter to handle case sensitivity with arbitrary operators - add charset and collation support to field declaration in all drivers - handle LOBs in buffered result sets (Request #8793)";}i:1;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.2.2";s:3:"api";s:5:"2.2.2";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-09-03";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:1412:"- flip positions property array in prepared statement objects to make it possible to optionally use the same named placeholder in multiple places inside a single prepared statement - expanded prepare tests to cover more edge cases - renamed valid_types property to valid_default_values in the Datatype module open todo items: - handle autoincrement fields in alterTable() - add length handling to LOB reverse engineering - expand charset support in schema management and result set handling (Request #4666) - add EXPLAIN abstraction - add cursor support along the lines of PDO (Request #3660 etc.) - expand length/scale support for numeric types (Request #7170) - add PDO based drivers, especially a driver to support SQLite 3 (Request #6907) - add support to export/import in CSV format - add more functions to the Function module (MD5(), IFNULL(), LENGTH() etc.) - add support for database/table/row LOCKs - add support for FOREIGN KEYs and CHECK (ENUM as possible mysql fallback) constraints - generate STATUS file from test suite results and allow users to submit test results - add a package2.xml and explore use of install groups (pear install MDB2#mysql) - add support for full text index creation and querying - add tests to check if the RDBMS specific handling with portability options disabled behaves as expected - handle implicit commits (like for DDL) in any affected driver (mysql, sqlite..)";}i:2;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.2.1";s:3:"api";s:5:"2.2.1";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-08-21";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:2632:"- fixed missing code in tableInfo() (Bug #8289) - fixed handling of indexes and constraints and types in tableInfo() (fixes BC break) - do not set nested transaction error if error is expected - explictly default to NULL when the column is NULLable and no default is set (related to Bug #8359) - added support for case insensitive matching via ILIKE in matchPattern() - added getAsKeyword() for generating "AS" keyword as required by the RDBMS - return an error if a named placeholder name is used twice inside a single statement - add support for multi column PRIMARY KEYs in createTable() - added lower() and upper() to the function module - moved escaping tests to datatype tests - added summary at the end of a test run for each RDBMS - explicitly pass the php_type var in all internal loadModule() calls - added support for 'primary' option in createTable() - expanded NULL tests - fixed handling return values when disable_query is set in _doQuery() and _execute() - check if safe_mode is enabled in fileExists() to determine what algo to use (Bug #8296) - added a test case for updating LOBs - added rtrim test case for LOBs - if result types are specified only rtrim() type 'text' fields (otherwise it will mean that for some drivers LOB's would get rtrimmed) - phpdoc fixes to the convertResult*() methods - added execParam() method and code tweaks for get*() methods in the Extended module - removed redundant assertions when testing if a given feature is unsupported - removed tests of portability off (users should just set the given portability setting they want to test in their test_setup.php) open todo items: - handle autoincrement fields in alterTable() - add length handling to LOB reverse engineering - expand charset support in schema management and result set handling (Request #4666) - add EXPLAIN abstraction - add cursor support along the lines of PDO (Request #3660 etc.) - expand length/scale support for numeric types (Request #7170) - add PDO based drivers, especially a driver to support SQLite 3 (Request #6907) - add support to export/import in CSV format - add more functions to the Function module (MD5(), IFNULL(), LENGTH() etc.) - add support for database/table/row LOCKs - add support for FOREIGN KEYs and CHECK (ENUM as possible mysql fallback) constraints - generate STATUS file from test suite results and allow users to submit test results - add a package2.xml and explore use of install groups (pear install MDB2#mysql) - add support for full text index creation and querying - add tests to check if the RDBMS specific handling with portability options disabled behaves as expected";}i:3;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.2.0";s:3:"api";s:5:"2.2.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-07-23";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:3286:"- added MDB2_AUTOQUERY_SELECT (Request #7817) - added nested transaction support (inspired by ADODB's smart transactions) but expanded to optionally use SAVEPOINTs *EXPERIMENTAL* beginNestedTransaction(), completeNestedTransaction(), failNestedTransaction(), getNestedTransactionError() - inTransaction() will now return an integer with the nested transaction depth if a nested transaction has been started - added setTransactionIsolation() - added savepoint support to beginTransaction(), commit() and rollback() - added Native base class for consistency - added missing colnum parameter to queryOne() [used by getOne()] - added new tests for get*() Extended module methods - fixed missing db variable from getValidTypes() - added testing of a prepared statement with no parameters - added handling of empty result sets to result set verification in the test suite - oci8 and ibase (and possibly other rdbms) do not like freeing the statement before reading the result set (Bug #8068): * moved statement freeing after reading the result set in get*() Extended methods * bypass prepared statement API for queries without parameters in autoExecute() (this means you cannot use parameters with SELECT statements in autoExecute() on the above mentioned platforms) - use data type callback in getValidTypes() - fixed identifier quoting in buildManipSQL() for SELECT statements (thx Kailoran) - phpdoc and cosmetic fixes in limitQuery() - added matchPattern() and patternEscapeString(), escapePattern() *EXPERIMENTAL* - added ability to escape wildcard characters in escape() and quote() - added debug() call at the end of a query/prepare/execute calling (Request #7933) - added context array parameter to debug() and make use of it whereever sensible - added optional method name parameter to raiseError() and use whereever possible - added a new option "debug_expanded_output" which needs to be set to true to get additional context information and to get "post" callback calls - added testPortabilityOptions() - set length of 8 and fixed for user_password in the test suite - reworked tableInfo() to use a common implementation based on getTableFieldDefinition() when a table name is passed (Bug #8124) - disconnect after changing database/DSN (otherwise transactions may be left open) open todo items: - handle autoincrement fields in alterTable() - add length handling to LOB reverse engineering - expand charset support in schema management and result set handling (Request #4666) - add EXPLAIN abstraction - add cursor support along the lines of PDO (Request #3660 etc.) - expand length/scale support for numeric types (Request #7170) - add PDO based drivers, especially a driver to support SQLite 3 (Request #6907) - add support to export/import in CSV format - add more functions to the Function module (MD5(), IFNULL(), LENGTH() etc.) - add support to generating "AS" keyword if required - add support for database/table/row LOCKs - add ActiveRecord implementation (probably as a separate package) - add support for FOREIGN KEYs and CHECK (ENUM as possible mysql fallback) constraints - extended to support for case insensitive matching via ILIKE/collate in matchPattern() - generate STATUS file from test suite results and allow users to submit test results";}i:4;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.1.0";s:3:"api";s:5:"2.1.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-06-15";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:1721:"- removed bogus code from execute() - new test case for floats/decimals and locale - reworked fix for float/decimal handling - expanded scientific notation handling - fixed several minor issues with the datatype tests - removed use of "*" in all places in the test suite that are followed by a fetch - tweaked handling of free() for prepared statements - return error if a prepared statement is attempted to be free'ed or executed again - added result_wrap_class param to limitQuery() - added parameter to not quote return value of getBeforeId() - added setCharset() - enable transactions by default - added decimal reverse engineering test - fixed parameter order in assertions in reverse engineering fields tests - generalized quoteIdentifier() with a property - switched most array_key_exists() calls to !empty() to improve readability and performance - fixed a few edge cases and potential warnings - added ability to rewrite queries for query(), exec() and prepare() using a debug handler callback - added 'datatype_map' option (Request #7797) - added reverse parameter to getColumnNames() - added 'datatype_map_callback' option - added getValidTypes() method to handle additional types from the 'datatype_map' option - set last_query in _execute() to prepared statement (Bug #7856) - adding random function emulation to generate a float between 0 and 1 - explicitly fetch row id = 1 in LOB tests - cosmetic fix to prepare() (Bug #7883) - bumped PHP dependency to 4.3.2 because of LOB stream support open todo items: - handle autoincrement fields in alterTable() - add support for ADODB style "smart transactions": http://phplens.com/lens/adodb/docs-adodb.htm#ex11 - add length handling to LOB reverse engineering";}i:5;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.0.3";s:3:"api";s:5:"2.0.3";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-05-22";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:633:"- fix float/decimal handling (Request #3021) - default to decimal for double (instead of float) - serialize arrays when no type is explicitly given - phpdoc fixes - expanded FLOAT test - added support for identifier quoting (Request #7671) - added test class for the Extended module - added support for DELETE in auto*() methods (Request #5345) - added "emulate_prepared" option to force prepared statement emulation open todo items: - handle autoincrement fields in alterTable() - add support for ADODB style "smart transactions": http://phplens.com/lens/adodb/docs-adodb.htm#ex11 - add length handling to LOB reverse engineering";}i:6;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.0.2";s:3:"api";s:5:"2.0.2";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-05-14";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:2298:"- phpdoc and folding mark fixes (thx Laurent and Stoyan) - added getTriggerDefinition() in the Reverse module - added listTableViews() in the Manager module - explicitly set is_manip parameter to false for transaction debug calls - various minor tweaks to error messages, phpdoc and adding stub methods to the common driver - added row seeking support to fetchOne() - added ability to hint that a constraint is a primary key in dropConstraint() - since we no longer complain about primary keys not being called primary we can remove the necessary hacks in the test suite - improved LOB tests in the test suite - do not require Manager module for core API tests - added support for fixed and variable types for 'text' in declarations, as well as in reverse engineering (Request #1523) - updated MAINTAINERS to current status - readded STATUS document, still needs to be filled with content - tweaked handling of error objects inside raiseError() - made _doQuery() return a reference - added userinfo's to all raiseError calls that previously had none - added bindValueArray() - use bindValueArray() instead of bindParamArray() in all internal calls - removed the skeleton drivers, since its too much work to maintain them and there are plenty of sample drivers to look at - fixed example due to API change in MDB2_Schema (Bug #7575) - added 'prepared_statements' supported meta data setting - do not retrieve lob in the stream constructor and streams_eof() - strip of file:// prefix in writeLOBToFile() - typo fix ressource/resource in LOB array - removed lob property from the LOB streams wrapper (references are always shaky business in PHP so lets use them as little as possible) - fixed _destroyLOB() API to match other private LOB methods - fixed phpdoc comments of all private LOB methods - typo fix in autoincrement test - reworked index/constraint creation to not affected unnecessary reverse tests Note: Due to changes in generation of declaration statements you may need to update your test databases (for example by rerunning the MDB2_Schema installation using the CVS version or a release greater than 0.5.0) open todo items: - handle autoincrement fields in alterTable() - add support for ADODB style "smart transactions": http://phplens.com/lens/adodb/docs-adodb.htm#ex11";}i:7;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.0.1";s:3:"api";s:5:"2.0.1";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-04-16";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:1609:"- added new comprehensive tests for the Reverse module - fixed testcases to pass for mysql[i] (needs pk's to be called "primary") .. sqlite is probably severely broken for these tests - added ability to specify port number when using unix sockets in MDB2::parseDSN() (bug #5982) - added test for multi_query option - typo fix in get constraint test - use ugly fopen() hack in fileExists() http://marc.theaimsgroup.com/?l=pear-dev&m=114148949106207&w=2 - allow "." and "$" in sequence name (bug #7081) - aligned _modifyQuery() signature and phpdoc - added inTransaction() to determine if a transaction is currently open - added support for tabe options in createTable() (bug ##7079) - make it possible to overwrite the error code-message map - added sample sqlite in memory dsn to php5 example - added 'result_introspection' supported metadata support - added bindValue() method - use MDB2_PREPARE_MANIP where we previously were using false - fixed default values for date and timestamp - if MDB2_PORTABILITY_EMPTY_TO_NULL is set change '' to ' ' in _getDeclaration() - refactored class loading into MDB2::loadClass() - properly quote CURRENT_* for temporal types (bug #6416) - added connected_server_info to cache server info in getServerInfo() - reset all connection related properties in disconnect() - separated result_buffering and prefetching by adding the new result_prefetching option - set error code in all raiseError() calls - added support for length in reverse engineering of integer fields - improve test suite documentation open todo items: - handle autoincremement fields in alterTable()";}i:8;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.0.0";s:3:"api";s:5:"2.0.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-02-09";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:79:"- handle null as resource when disable_query option is enabled in result object";}i:9;a:5:{s:7:"version";a:2:{s:7:"release";s:8:"2.0.0RC5";s:3:"api";s:8:"2.0.0RC5";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2006-02-05";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:916:"- expanded testing of prepared queries (out of order binding, escape characters inside the string, lobs without named parameters that match the field name) - removed ugly hack for quote parameter in quote() since it was insufficient (escaping also needs to be prevented) - added support for out of order parameter binding in prepared queries - expanded testing of prepared queries (out of order binding, escape characters inside the string, lobs without named parameters that match the field name) - reset row_limit and row_offset after calling prepare() just like we do for query() and exec() - cosmetic fix (removed "row_" prefix from "row_limit" and "row_offset") - now using INT/TINYINT/SMALLINT by default instead of CHAR(1) for the boolean datatype (BC BREAK!) - added MDB2_datatype_testcase to test suite - support an arbitrary number of arguments in concat() - add property phpdoc comments to LOB.php";}i:10;a:5:{s:7:"version";a:2:{s:7:"release";s:8:"2.0.0RC4";s:3:"api";s:8:"2.0.0RC4";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2006-01-13";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:796:"- explicitly pass if the module is phptype specific in all loadModule calls (bug #6226) - some cleanups in loadModule() - eliminate possible warnings in execute() and _assignBindColumns() - do not silence includes when debug option is enabled - fixed serious bug in autoincrement test - added dbsyntax to getDSN() string output (feature request #6463) - fixed signature of executeStoredProc() - nextResult() returns false if there are no more result sets to read - renamed _isIndexName() to _fixIndexName() - _fixIndexName() now just attempts to remove possible formatting - renamed _isSequenceName() to _fixSequenceName() - _fixSequenceName() now just attempts to remove possible formatting, and only returns a boolean if no formatting was applied when the new "check" parameter is set to true";}i:11;a:5:{s:7:"version";a:2:{s:7:"release";s:8:"2.0.0RC3";s:3:"api";s:8:"2.0.0RC3";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2005-12-30";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:479:"- added error handling when result set introspection is not supported in _wrapResult() - fixed example - removed peardb wrapper (its broken, unmaintained and probably unused) - added new example using php5 only features - MDB2_OK is now a boolean true, instead of integer 1 - types can now always be keyed by name or by order - renamed setResultTypes() in the datatype module to checkResultTypes() and modified the signature accordingly - removed no longer used MDB2::isManip()";}i:12;a:5:{s:7:"version";a:2:{s:7:"release";s:8:"2.0.0RC2";s:3:"api";s:8:"2.0.0RC2";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2005-12-28";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:616:"- fixed testNow() to use the datatype abstraction - fixed testGetTableFieldDefinition() to use a blob column instead of a clob since we default to blob when we cannot differntiate between blob and clob - split up alterTable() testing into two separate test methods - removed errorNative() was never implemented, use errorInfo() instead - fixed major bug in _fixResultArrayValues() that would lead to performance or incorrect application of portability features - phpdoc fixes in LOB.php, Iterator.php, Date.php and Extended.php - removed not required prev() and hasPrev() from the SeekableIterator implementation";}i:13;a:5:{s:7:"version";a:2:{s:7:"release";s:8:"2.0.0RC1";s:3:"api";s:8:"2.0.0RC1";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2005-12-21";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:1629:"- added numerous testcases in the manager and reverse module - unified case fixing in the list*() methods - case-insensitive comparison in _isSequenceName() - added getConnection() to fetch a native connection resource - split index and constraint handling - quote identifiers where possible inside the manager methods depending on the new 'quote_identifier' option (defaults to off) - refactored get*Declaration() methods to use getTypeDeclaration() - setting in_transaction to false on disconnect - store if type has changed in compareDefinition() - added new Function modules to handle difference in SQL functions - added verious new test cases - refactored test cases to use an MDB2_testcase base class - allow empty field parameter in get*ID() methods (bug #5791) - tweaked error messages for file loads - split off manipulation queries into exec() method from the query() method *BC BREAK* - only if result_types is set to false in prepare() method the query will be handled as a DML statement *BC BREAK* - use a proper default value if a field is set to not null in _getDeclaration*() (bug #5930) - added getServerVersion() - renamed defaultOutput() to getDefaultOutput() *BC BREAK* - use tableInfo() to automatically determine the result types if type is set to true - reworked file loading to work around issues in safe_mode with MDB2::fileExists() (bug #6226) - no need to return by reference in getConnection() (it even seems to work for mysqli that has objects and not resource connections) - added "idxname_format" as option similar to "seqname_format" - fixed bug in API calls inside autoExecute() (bug #6286)";}i:14;a:5:{s:7:"version";a:2:{s:7:"release";s:10:"2.0.0beta6";s:3:"api";s:10:"2.0.0beta6";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2005-10-16";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:3425:"Warning: this release features numerous BC breaks! There have been considerable improvements to the datatype, manager and reverse modules. Furthermore preliminary support for auto increment and primary keys has been added. Please note that making a field auto increment implies a single column primary key on this field. - increased php dependency to 4.3.0 due to the usage of the streams API since beta5 - moved logic from MDB2::connect() to MDB2::factory(), the only difference is that MDB2::connect will immediatly try to connect to the database - MDB2::singleton now uses MDB2::factory() - added support for auto increment and primary key in schema. (mysql[i]) - alterTable now needs the full definition to work (use getTableFieldDefinition from Reverse module if you do not have a definition at hand) this eliminates the need of the declaration part in the alterTable array. - nicer test chooser. Added some js magic to [un]select all the tests in a group - fixed typo in _getTextDeclaration() - fix PHP4.4 breakage - ensure that types and result_types property in the statement class is an array (bug #4695) - added support for fetchmode in the iterator class and for any other result wrapper class (bug #4685) - moved getInsertID() into core as lastInsertID() - moved getBeforeID() and getAfterID() from core into the extended module - added base class for all modules (which provides getDBInstance()) - added free() method to remove an instance from the global instance array - removed schema manager related error codes from MDB2::errorMessage() - dont set the include path in test suite (people can do that in test_setup.php) - added missing default numRows() method - added hack into stream_eof() to handle the BC break in 5.0.x - removed uncessary duplicate quoting in quote() in the peardb wrapper (bug #5195) - warning fix in BC hack of connect() in the peardb wrapper - tweaked error message in setResultTypes() - removed PDO compatibility code in bindParam and bindCol, now using 0-index numeric keys again - expect keys in type arrays the same way as they are passed for the values in execute() and bindParamArray() - add s pattern modifier to preg_replace() call for parameter searches in prepare() (bug #5362) - moved all private fetch mode fix methods into _fixResultArrayValues() for performance reasons - added new portability fetch mode MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES (to remove database/table qualifiers from assoc indexes) - renamed MDB2_PORTABILITY_LOWERCASE to MDB2_PORTABILITY_FIX_CASE and use 'field_case' option to determine if to upper- or lowercase (CASE_LOWER/CASE_UPPER) - ensure that fetchAll always returns an array() even if the result set was empty - use array_key_exists() instead of isset() where possible - changed structure of field add/remove/change in alterTable() to match MDB2_Schema - added default values for supported property - reworked supports() to return the given value and also return errors for non existant support feature - reworked subSelect() to use the 'emulated' supports() return value - removed implementation of createIndex() (now every driver needs to implement it themselves) - sync fileExists with the LiveUser one, explode instead of split and is_readable instead of file_exists. - tweaked compare method family to better deal with optional properties open todo items: - add test cases for the various module methods - add getServerVersion()";}i:15;a:5:{s:7:"version";a:2:{s:7:"release";s:10:"2.0.0beta5";s:3:"api";s:10:"2.0.0beta5";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2005-06-08";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:1230:"Warning: this release features numerous BC breaks to make the MDB2 API be as similar as possible as the ext/pdo API! The next release is likely to also break BC for the same reason. Check php.net/pdo for information on the pdo API. - refactored LOB support (BC breaks) - moved all drivers into separate packages MDB2_Driver_* (BC break) - bindParam() and bindColumn() are now 1-indexed (BC break) - removed special handling for day light saving time (bug #4341) (BC break) - ensure SQL injection protection in all _quote() methods (was missing in some decimal, float, time, date and timestamp implementations) - renamed getRowCount() to rowCount() for PDO compliance (BC break) (doesnt take into account the offset anymore) - added new quote() parameter to remove quotes (ugly hack will get cleaned up) - renamed execute() to _execute() since common provides some common functionality via execute() - fixed some issues regarding limit/offset in prepared statements - fixed bug in _assignBindColumns() when using associative fetches - support numeric and string keys in types array for prepared queries - call trigger error if __call() is unable to find a method in any of the modules - work around php5 bugs in the test suite";}i:16;a:5:{s:7:"version";a:2:{s:7:"release";s:10:"2.0.0beta4";s:3:"api";s:10:"2.0.0beta4";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2005-04-29";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:2802:"Warning: this release features numerous BC breaks to make the MDB2 API be as similar as possible as the ext/pdo API! The next release is likely to also break BC for the same reason. Check php.net/pdo for information on the pdo API. - fixed bugs in MDB2_Extended::buildManipSQL() introduced in latest tweaks (bug #3725) - mysqli has connection objects instead of resources - fix mssql tableInfo() so flags are returned (bug #3691) - fixed bug in handling of force_array when 2 or less columns are fetched in fetchAll() - added map error message for sqlite multi-column unique constraints. - added listUsers(), listViews(), listFunctions() to oracle manager - added listFunctions() to pgsql manager - updated listViews() in pgsql manager - added __call() support for module handling - mysql driver now uses mysqli implementations where feasible - ensure that internal calls to query dont wrap the result - for some reason mysqli didnt like SELECT LAST_INSERT_ID() - fixed bug in table alteration when only an index was added - updated pgsql API calls to 4.2.0 recommended names (bug #3904) - moved logic to compareDefinitions from the Manager into the Datatype module to increase flexibility - extended MDB2::isError() to be able to handle an array or codes - added error handling into autoPrepare() and autoExecute() - migrade all MDB2::isError calls that dont check for specific errors codes to PEAR::isError - don't pass new_link to mysql_pconnect() (bug #3993) - use MDB2::raiseError() instead of MDB2_Driver_Common::raiseError() - do not disable result wrapping when doing internal calls to query() (bug #3997) - _wrapResult() now ensures that the result class is an instance of MDB2_Result_Common - unbundled the MDB2_Tools_Manager into a separate package PEAR::MDB2_Schema - improved getTableFieldDefinition() and moved native type mapping to the datatype module mapNativeDatatype() method (mysql, sqlite, pgsql and ibase drivers) - fixes for listTables() in sqlite and pgsql driver - ensure that mysql drivers use the dummy_primary_key property - severely reworked how data is fetched and buffered and freed in the iterator - added mapNativeDatatype() to ibase driver - getTypeDeclaration() => _getTypeDeclaration() in ibase driver - cosmetic fixes and tweaks (replace(). fetchOne() ..) - renamed 'seqname_col_name' option to 'seqcol_name' - moved schema documentation, xml_reverse_engineering.php, MDB.dtd and MDB.xls to MDB_Schema package - Mysqli: implicit sequence is named as table by default - Mysqli: text types now map to clob first - ensure that types are numerically keyed in setResultTypes() - added caching to getColumnNames() - added bindColumn() support - use MDB2_Schema::factory() - phpdoc fixes in regards to flipped fetchmode - remove renegate mysql code in sqlite driver";}i:17;a:5:{s:7:"version";a:2:{s:7:"release";s:10:"2.0.0beta3";s:3:"api";s:10:"2.0.0beta3";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2005-03-06";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:7520:"Warning: this release features numerous BC breaks to make the MDB2 API be as similar as possible as the ext/pdo API! The next release is likely to also break BC for the same reason. Check php.net/pdo for information on the pdo API. Oracle NULL in LOB fields is broken. The fbsql and mssql drivers are likely to be broken as they are largely untested. MDB2 static class: - "xxx" out password on connect error in MDB2::connect() - MDB2::isError now also optionally accepts and error code to check for - added LOAD DATA (port from DB) and SET to MDB2::isManip() All drivers: - use __construct() (PHP4 BC hacks are provided) - allow null values to be set for options - ensure we are returning a reference in all relevant places - allow errorInfo() to be called when no connection has been established yet - use MDB2_ERROR_UNSUPPORTED instead of MDB2_ERROR_NOT_CAPABLE in common implementations - readded MDB2_Error as the baseclass for all MDB2 error objects - updated error mappings from DB - added MDB2_Driver_Common::getDatabase(); - reworked dsn default handling - added ability to "xxx" out password in getDSN() - use _close() method in several places where they previously were not used - removed redundant code in _close() that dealt with transaction closing already done in disconnect() - if the dbsyntax is set in the dsn it will be set in the dbsyntax property - only disconnect persistant connections if disconnect() has been explicitly called by the user - instead of having a generic implemention of disconnect() we will rename _close() to disconnect() to overwrite the generic implementation - added support for 'new_link' dsn option for all supported drivers (mysql, oci8, pgsql) - transaction API moved over to PDO: removed autoCommit(), added beginTransaction() and refactored commit() (it doesn't start a new transaction automatically anymore) - reworked handling of uncommited transaction for persistant connections when a given connection is no longer in use - added 'disable_query' option to be able to disable the execution of all queries (this might be useful in conjuntion with a custom debug handler to be able to dump all queries into a file instead of executing them) - removed affectedRows() method in favor of returning affectedRows() on query if relevant - added generic implementation of query() and moved driver specific code into _doQuery() - added _modifyQuery() to any driver that did not yet have it yet - standaloneQuery() now also supports SELECT querys - remove redundant call to commit() since setting autoCommit() already commits in MDB2::replace() - refactored standaloneQuery(), query(), _doQuery(), _wrapResult(); the most important change are: result are only wrapped if it is explicitly requested standaloneQuery() now works just as query() does but with its own connection - allowing limits of 0 in setLimit() - explicitly specify colum name in sequence emulation queries - added getBeforeId() and getAfterId() - added new supported feature 'auto_increment' - added default implementation for quoteCLOB() and quoteBLOB() - reworked quote handling: moved all implementation details into the extension, made all quote methods private except for quote() itself, honor portability MDB2_PORTABILITY_EMPTY_TO_NULL in quote(), removed MDB2_TYPE_* constants - reworked get*Declaration handling: moved all implementation details into the extension, made all quote methods private except for quote() itself - placed convert methods after the portability conversions to ensure that the proper type is maintained after the conversion methods - dont convert fetched null values in the Datatype module - removed executeParams() and moved executeMultiple() from extended module - updated tableInfo() code from DB - made LIMIT handling more robust by taking some code from DB All drivers result: - performance tweak in fetchCol() - added MDB2_FETCHMODE_OBJECT - added MDB2_Driver_Result_Common::getRowCounter() - added rownum handling to fetchRow() - removed fetch() and resultIsNull() All drivers prepared statements - moved prepare/execute API towards PDO - setParamsArray() can now handle non ordered arrays - removed requirement for LOB inserts to pass the parameters as an array - placeholders are now numbered starting from 0 (BC break in setParam() !) - queries inside the prepared_queries property now start counting at 1 (performance tweak) - refactored handling of filename LOB values (prefix with 'file://') - removed _executePrepared(), drivers need to overwrite execute() for now on - add support for oracle style named parameters and modified test suite accordingly MySQL driver: - improved handling of MDB2_PORTABILITY_LOWERCASE in all the reverse methods inside the mysql driver to work coherently - fixed several issues in the listTablefields() method of manager drivers MSSQL driver: - added code in MDB2_Driver_mssql::connect() to better handle date values independant of ini and locale settings inside the server - use comma, rather than colon, to delimit port in MDB2_driver_mssql::connect(). Bug 2140. (danielc) - unified mssql standalone query with sqlite, mysql and others (not tested on mssql yet, but since mssql automatically reuses connections per dsn the old way could gurantee anything different from happening) PgSQL driver: - use track_errors to capture error messages in MDB2_driver_pgsql::connect(). Bug 2011. (danielc) - add port to connect string when protocol is unix in MDB2_driver_pgsql::connect(). Bug 1919. (danielc) - accommodate changes made to PostgreSQL so "no such field" errors get properly indicated rather than being mislabeled as "no such table." (danielc) - added "permission denied" to error regex in pgsql driver. Bug 2417. (stewart_linux-org-au) OCI8 driver: - fixed typo in MDB2_Driver_Manager_oci8::listTables() (fix for bug #2434) - added emulate_database option (default true) to the Oracle driver that handles if the database_name should be used for connections of the username - oci8 driver now uses native bind support for all types in prepare()/execute() Interbase driver: - completely revised ibase driver, now passing all tests under php5 Frontbase driver: - fbsql: use correct error codes. Was using MySQL's codes by mistake. MySQLi driver: - added mysqli driver (passes all tests, but doesnt use native prepare yet) DB wrapper - fixed a large number of compatibility issues in the PEAR::DB wrapper Iterator - fixed several bugs and updated the interface to match the final php5 iterator API - buffered result sets now implements seekable - removed unnecessary returns - throw pear error on rewind in unbuffered result set - renamed size() to count() to match the upcoming Countable interface Extended module: - modified the signature of the auto*() methods to be compatible with DB (bug #3720) - tweaked buildManipSQL() to not use loops (bug #3721) MDB_Tools_Manager - updated raiseError method in the Manager to be compatible with XML_Parser 1.1.x and return useful error message (fix bug #2055) - major refactoring of MDB2_Manager resulting in several new methods being available - fixed error in MDB2_Manager::_escapeSpecialCharacter() that would lead to incorrect handling of integer values (this needs to be explored in more detail) - several typo fixes and minor logic errors (among others a fix for bug #2057) - moved xml dumping in MDB2_Tools_Manager into separate Writer class - fixed bugs in start value handling in create sequence (bug #3077)";}i:18;a:5:{s:7:"version";a:2:{s:7:"release";s:10:"2.0.0beta2";s:3:"api";s:10:"2.0.0beta2";}s:9:"stability";a:2:{s:7:"release";s:4:"beta";s:3:"api";s:4:"beta";}s:4:"date";s:10:"2004-04-25";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:2601:"The core of MDB2 is now fairly stable API-wise. The modules, especially the manager and reverse module, might see some API refinement before the first stable release. - added listTables() and listTableFields() methods to MDB2_Driver_Manager_mssql and MDB2_Driver_Manager_oci8 - reversed parameter order of getValue(), type parameter is now optional and will then be autodetected (BC break!) - renamed get*Value() to quote*() (BC break!) - fixed LOB management in MDB2_Driver_ibase - moved getOne, getRow, getCol, getAll back into the exteneded module (most users should be able to move to the queryOne, queryRow, queryCol and queryAll equivalent) (BC break!) - added getAssoc to the extended module - fixed bug in MDB2_Driver_Datatype_Common::implodeArray() - added sequence_col_name option to make the column name inside sequence emulation tables configurable - fixed a bug in the MDB2_Driver_oci8 and MDB2_Driver_ibase buffering emulation when using limit queries - removed MDB2_PORTABILITY_NULL_TO_EMPTY in favor of MDB2_PORTABILITY_EMPTY_TO_NULL this means that DB and MDB2 work exactly the opposite now, but it seems more efficient to do things the way Oracle does since this is the RDBMS which creates the original issue to begin with (BC break!) - fixed a typos in getAll, getAssoc and getCol - test suite: moved set_time_limit() call to the setup script to be easier to customize - renamed hasMore() to valid() due to changes in the PHP5 iterator API (BC break!) - renamed toString() to __toString() in order to take advantage of new PHP5 goodness and made it public - MDB2_Driver_Datatype_Common::setResultTypes() can now handle missing elements inside type arrays: array(2 => 'boolean', 4 => 'timestamp') - fixed potential warning due to manipulation query detection in the query*() and the get*() query+fetch methods - added tests for fetchAll() and fetchCol() - performance tweaks for fetchAll() and fetchCol() - fixed MDB2_Driver_Manager_mysql::listTableIndexes() - fixed MDB2_Driver_Common::debug() - renamed MDB2::isResult() to MDB2::isResultCommon() - added base result class MDB2_Result from which all result sets should be inherited and added MDB2::isResult() which checks if a given object extends from it - added 'result_wrap_class' option and optional parameter to query() to enable wrapping of result classes into an arbitrary class - added $result_class param to all drivers where it was missing from the query() and _executePrepared() methods - applied several fixes to the PEAR::DB wrapper - fixed a typo in MDB2_Driver_Reverse_pgsql::tableInfo()";}i:19;a:5:{s:7:"version";a:2:{s:7:"release";s:10:"2.0.0beta1";s:3:"api";s:10:"2.0.0beta1";}s:9:"stability";a:2:{s:7:"release";s:5:"alpha";s:3:"api";s:5:"alpha";}s:4:"date";s:10:"2004-03-12";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:1280:"- fixed bug in MDB2::singleton - fixed minor bugs in prepare/execute - added PEAR::DB wrapper (not working yet) - fixed several bugs in the ibase driver - fixed several PHP5 related issues - fixed bug in sequence creation on MySQL - fixed issues with nextid() ondemand handling in conjunction with currId() - added native currId() implementation for the Oracle driver - fixed sqlite driver (passes all but the REPLACE test due to a conformance issue in sqlite itself) - removed decimal_factor property to allow changing of decimal_places option - using native escape string methods in sqlite and mysql driver - fixed minor conformance issues in tableInfo() in the oci8 and mysql driver - removed optimize option and added portability option instead (ported from DB) - added quoteIdentifier() method (ported from DB) - added STATUS document to make the status of the drivers more transparent - fixed a few bugs in querysim driver - fixed issue in mysql reverse engineering: ensuring the correct case is used when doing assoc fetches based on portability flag setting - updated reverse engineering script to the new MDB2 API - removed broken implementations of currId() in the mssql and fbsql driver - fixed a few instances of MDB_Common to the new class name of MDB_Driver_Common";}i:20;a:5:{s:7:"version";a:2:{s:7:"release";s:11:"2.0.0alpha1";s:3:"api";s:11:"2.0.0alpha1";}s:9:"stability";a:2:{s:7:"release";s:5:"alpha";s:3:"api";s:5:"alpha";}s:4:"date";s:10:"2004-01-05";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:11:"BSD License";}s:5:"notes";s:1845:"This is the first alpha release of MDB2 2.0. MDB2 2.x breaks backwards compatibility in many ways in order to simplify the API for both users and drivers developers. Please note that currently only the MySQL, the PostGreSQL and the Oracle driver have been tested to pass the test suite. Here follows a short list of the most important changes: - all code that is not necessary for basic operation is now separateed into separate modules which can be loaded with the loadModule() method - all datatype related methods have been moved to a dataype module with the notable exception of getValue() and the newly introduced getDeclaration() - added extended module for highlevel methods - all manager method are no longer available in the core class and or now only available in the manager module - all reverse engineering methods have been taken from the manager class and are now available through the reverse module - a new module has been added to allow the addition of methods with RDBMS specific functionality (like getting the last autoincrement ID) - LOB handling has been greatly simplified - several methods names have been shortend - the fetch.+() methods do not free the result set anymore - the Manager and the reverse_engineer_xml_schema have been moved into a Tools directory - all parameters are now lowercased with underscores as separators - all drivers now support all of the dsn options that PEAR DB supports - several methods have been removed because they offered redundant functionality - changed prepare API type is now passed to prepare and not to setParam*() - results are now wrapped inside objects and all methods which operate on resultsets have been moved into respecitive classes - there are two types of result object: buffered (default) and unbuffered - totally rewrote buffering and limit emulation";}}}s:8:"filelist";a:42:{s:25:"docs/examples/example.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"b5cd8d01a36258caa0c4eb7e3478c219";s:4:"name";s:25:"docs/examples/example.php";s:4:"role";s:3:"doc";s:12:"installed_as";s:74:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\examples\example.php";}s:30:"docs/examples/example_php5.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"9d111ec2aec184bc1ece351aa7a59aaa";s:4:"name";s:30:"docs/examples/example_php5.php";s:4:"role";s:3:"doc";s:12:"installed_as";s:79:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\examples\example_php5.php";}s:37:"docs/examples/metapear_test_db.schema";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"74b2bb45de61eccbffed7d75d5268af9";s:4:"name";s:37:"docs/examples/metapear_test_db.schema";s:4:"role";s:3:"doc";s:12:"installed_as";s:86:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\examples\metapear_test_db.schema";}s:17:"docs/CONTRIBUTORS";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a253b37e185622112acfef6c94b79aef";s:4:"name";s:17:"docs/CONTRIBUTORS";s:4:"role";s:3:"doc";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\CONTRIBUTORS";}s:19:"docs/datatypes.html";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"cc1befe78146094be02f89bbb201b4ab";s:4:"name";s:19:"docs/datatypes.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:68:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\datatypes.html";}s:16:"docs/MAINTAINERS";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a70b17bcd8e56911f74a4dff61a3ff8d";s:4:"name";s:16:"docs/MAINTAINERS";s:4:"role";s:3:"doc";s:12:"installed_as";s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\MAINTAINERS";}s:11:"docs/README";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"c7b68ea23aa2ae6d91913703a2246f15";s:4:"name";s:11:"docs/README";s:4:"role";s:3:"doc";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\README";}s:11:"docs/STATUS";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"f9858c9327499e60db66621a817c66a4";s:4:"name";s:11:"docs/STATUS";s:4:"role";s:3:"doc";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\STATUS";}s:9:"docs/TODO";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ec0c4383ddfd3af69d577344d0d5b4dd";s:4:"name";s:9:"docs/TODO";s:4:"role";s:3:"doc";s:12:"installed_as";s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\TODO";}s:31:"MDB2/Driver/Datatype/Common.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"8d10cb404138fb05c577d040a34dc566";s:4:"name";s:31:"MDB2/Driver/Datatype/Common.php";s:4:"role";s:3:"php";s:12:"installed_as";s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Datatype\Common.php";}s:31:"MDB2/Driver/Function/Common.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"97bebd544d4da9b698fb40dfc9b5835d";s:4:"name";s:31:"MDB2/Driver/Function/Common.php";s:4:"role";s:3:"php";s:12:"installed_as";s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Function\Common.php";}s:30:"MDB2/Driver/Manager/Common.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ef96fac9e21f7b0d875fcd6019e83d76";s:4:"name";s:30:"MDB2/Driver/Manager/Common.php";s:4:"role";s:3:"php";s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Manager\Common.php";}s:29:"MDB2/Driver/Native/Common.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"005901a0e84f6ff717e0847f0a3faf14";s:4:"name";s:29:"MDB2/Driver/Native/Common.php";s:4:"role";s:3:"php";s:12:"installed_as";s:68:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Native\Common.php";}s:30:"MDB2/Driver/Reverse/Common.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"046ccbeb045bfa0f6e657d4bf5ea98f2";s:4:"name";s:30:"MDB2/Driver/Reverse/Common.php";s:4:"role";s:3:"php";s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Reverse\Common.php";}s:13:"MDB2/Date.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"af81dd360b2d2d09f8c978214b06a553";s:4:"name";s:13:"MDB2/Date.php";s:4:"role";s:3:"php";s:12:"installed_as";s:52:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Date.php";}s:17:"MDB2/Extended.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"62a14a62f64ad91e54f055a4da3cd5e3";s:4:"name";s:17:"MDB2/Extended.php";s:4:"role";s:3:"php";s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Extended.php";}s:17:"MDB2/Iterator.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"023c4bda6db2d8f277d8d3c76dc8f850";s:4:"name";s:17:"MDB2/Iterator.php";s:4:"role";s:3:"php";s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Iterator.php";}s:12:"MDB2/LOB.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"f3cefd7b2f7a1d5ac52a537aa2bdc495";s:4:"name";s:12:"MDB2/LOB.php";s:4:"role";s:3:"php";s:12:"installed_as";s:51:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\LOB.php";}s:16:"tests/basic.phpt";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"01d41e566bdb62c7bcb432c8039dda9a";s:4:"name";s:16:"tests/basic.phpt";s:4:"role";s:4:"test";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\basic.phpt";}s:17:"tests/clitest.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"6f322088ba70dd591a2cff31bf446525";s:4:"name";s:17:"tests/clitest.php";s:4:"role";s:4:"test";s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\clitest.php";}s:16:"tests/config.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"c90cdd55233d9ef470150c06a946d213";s:4:"name";s:16:"tests/config.php";s:4:"role";s:4:"test";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\config.php";}s:30:"tests/Console_TestListener.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"2a2c534ab4afb0c05ca9d7ca47815bf5";s:4:"name";s:30:"tests/Console_TestListener.php";s:4:"role";s:4:"test";s:12:"installed_as";s:80:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\Console_TestListener.php";}s:27:"tests/HTML_TestListener.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"d46a8f267dbd54f0c7ff55e479d33e7e";s:4:"name";s:27:"tests/HTML_TestListener.php";s:4:"role";s:4:"test";s:12:"installed_as";s:77:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\HTML_TestListener.php";}s:27:"tests/MDB2_api_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"98da3f3aba98f4a9adc71a9fd19929de";s:4:"name";s:27:"tests/MDB2_api_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:77:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_api_testcase.php";}s:28:"tests/MDB2_bugs_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"6f5ca4adb851f22a41f84bd7be1d9b4d";s:4:"name";s:28:"tests/MDB2_bugs_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:78:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_bugs_testcase.php";}s:27:"tests/MDB2_Connect_Test.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"f8534befe37efc7f35beb0897b75f951";s:4:"name";s:27:"tests/MDB2_Connect_Test.php";s:4:"role";s:4:"test";s:12:"installed_as";s:77:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_Connect_Test.php";}s:32:"tests/MDB2_datatype_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"593ff9ad532908f16d020ceaa9ab09f8";s:4:"name";s:32:"tests/MDB2_datatype_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:82:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_datatype_testcase.php";}s:32:"tests/MDB2_extended_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"be04baf42175f7bfc55412a08744c4e9";s:4:"name";s:32:"tests/MDB2_extended_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:82:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_extended_testcase.php";}s:32:"tests/MDB2_function_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ca4ad92dd091bc59b0f0be14b8cfdc0c";s:4:"name";s:32:"tests/MDB2_function_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:82:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_function_testcase.php";}s:31:"tests/MDB2_manager_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"edb864169081c5b6a2d9b6d5e2f28e83";s:4:"name";s:31:"tests/MDB2_manager_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:81:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_manager_testcase.php";}s:30:"tests/MDB2_native_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"22be0efc5b2b81bd6cd6ebe31747445e";s:4:"name";s:30:"tests/MDB2_native_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:80:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_native_testcase.php";}s:31:"tests/MDB2_reverse_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"6b283c945b2dea2d375aa390087b658d";s:4:"name";s:31:"tests/MDB2_reverse_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:81:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_reverse_testcase.php";}s:23:"tests/MDB2_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"2d4098056e3e1eb2ab73e5803d51c136";s:4:"name";s:23:"tests/MDB2_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:73:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_testcase.php";}s:29:"tests/MDB2_usage_testcase.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"03db646e093383e77f98454ea0876225";s:4:"name";s:29:"tests/MDB2_usage_testcase.php";s:4:"role";s:4:"test";s:12:"installed_as";s:79:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\MDB2_usage_testcase.php";}s:12:"tests/README";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"7a13f2bc2d431c365f838d12e7259ec6";s:4:"name";s:12:"tests/README";s:4:"role";s:4:"test";s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\README";}s:14:"tests/test.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a2c50ccea24f7bdd5439b366608d59d5";s:4:"name";s:14:"tests/test.php";s:4:"role";s:4:"test";s:12:"installed_as";s:64:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\test.php";}s:20:"tests/testchoose.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"dc05c6cc4540981d350ccac2005c2578";s:4:"name";s:20:"tests/testchoose.php";s:4:"role";s:4:"test";s:12:"installed_as";s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\testchoose.php";}s:15:"tests/tests.css";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"3c4d2c9d89398c5692d36299d98f9c6e";s:4:"name";s:15:"tests/tests.css";s:4:"role";s:4:"test";s:12:"installed_as";s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\tests.css";}s:19:"tests/testUtils.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"841447ae8672a6779166791d0bf6ec03";s:4:"name";s:19:"tests/testUtils.php";s:4:"role";s:4:"test";s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\testUtils.php";}s:25:"tests/test_setup.php.dist";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"c9e7116ea8cad94ec69fa9a5e4d195a6";s:4:"name";s:25:"tests/test_setup.php.dist";s:4:"role";s:4:"test";s:12:"installed_as";s:75:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests\test_setup.php.dist";}s:7:"LICENSE";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"a5019765abfd14334f25231c61c568ef";s:4:"name";s:7:"LICENSE";s:4:"role";s:4:"data";s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\MDB2\LICENSE";}s:8:"MDB2.php";a:5:{s:14:"baseinstalldir";s:1:"/";s:6:"md5sum";s:32:"ae732f6b7abdd7e1246e8112abc91ae6";s:4:"name";s:8:"MDB2.php";s:4:"role";s:3:"php";s:12:"installed_as";s:47:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2.php";}}s:12:"_lastversion";N;s:7:"dirtree";a:21:{s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs\examples";b:1;s:62:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\MDB2\docs\examples";b:1;s:53:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\MDB2\docs";b:1;s:53:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\MDB2\docs";b:1;s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Datatype";b:1;s:59:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\MDB2\Driver\Datatype";b:1;s:50:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\MDB2\Driver";b:1;s:43:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\MDB2";b:1;s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Function";b:1;s:59:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\MDB2\Driver\Function";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Manager";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\MDB2\Driver\Manager";b:1;s:57:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Native";b:1;s:57:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\MDB2\Driver\Native";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2\Driver\Reverse";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\MDB2\Driver\Reverse";b:1;s:43:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\MDB2";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\MDB2\tests";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\tests\MDB2\tests";b:1;s:48:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\MDB2";b:1;s:38:"D:\Apache2\htdocs\tshirtshop\libs\PEAR";b:1;}s:3:"old";a:7:{s:7:"version";s:5:"2.3.0";s:12:"release_date";s:10:"2006-11-03";s:13:"release_state";s:6:"stable";s:15:"release_license";s:11:"BSD License";s:13:"release_notes";s:3085:"- added charset and collation support to field declaration - added SQL comments and quoted identifier handling inside prepared statement parser - expanded length/scale support for numeric types (Request #7170) - added statement_format option to make it possible to define the name used for native statements if supported - fixed bug when setting MDB2_PREPARE_RESULT in autoExecute() - fixed notice in exec() call in autoExecute() - reversed if logic in MDB2::fileExists checking to be more fool proof with safe_mode restrictions (Bug #8296) - moved CREATE TABLE query generation in a separate method for reuse in the drivers - added testLOBRead to test multiple LOB reads - fixed getColumnNames() optional parameter handling (Bug #8857) - phpdoc fix for fetchCol/fetchAll - added an extra if in the autoExecute method of the Extended driver (Bug #8878) - expanded tableInfo() tests - expanded prepare() tests - fix the incorrect use of currID() for lastInsertID() emulation (Bug #9107) - add test for lastInsertID() - also output php version in test results - added supported 'new_link' - dropped use of track_errors because 5.2.0 causes php_errormsg to not get populated if a custom error handler is set and it was causing issues for safe_mode users anyways - added some error handling into the bindValues()/bindParams() methods (Bug #9133) - bindValue() does not need values by reference - fix issue in execute() when parameter is a scalar integer of 0 (Bug #9158) - implemented stream_stat() method (Bug #9092) - better deal with non scalar arguments in test helper function as 5.2.0 explodes otherwise - extracted _skipDelimitedStrings() method from prepare() - added test for _skipDelimitedStrings() method - migrated to package.xml version 2 open todo items: - handle autoincrement fields in alterTable() - add length handling to LOB reverse engineering - expand charset support in schema management and result set handling (Request #4666) - add EXPLAIN abstraction - add cursor support along the lines of PDO (Request #3660 etc.) - add PDO based drivers, especially a driver to support SQLite 3 (Request #6907) - add support to export/import in CSV format - add more functions to the Function module (MD5(), IFNULL(), LENGTH() etc.) - add support for database/table/row LOCKs - add support for FOREIGN KEYs and CHECK (ENUM as possible mysql fallback) constraints - generate STATUS file from test suite results and allow users to submit test results - explore use of install groups (pear install MDB2#mysql) - add support for full text index creation and querying - add tests to check if the RDBMS specific handling with portability options disabled behaves as expected - handle implicit commits (like for DDL) in any affected driver (mysql, sqlite..) - add a getTableFieldsDefinitions() method to be used in tableInfo() - drop ILIKE from matchPattern() and instead add a second parameter to handle case sensitivity with arbitrary operators - add charset and collation support to field declaration in all drivers - handle LOBs in buffered result sets (Request #8793)";s:12:"release_deps";a:3:{i:0;a:4:{s:4:"type";s:3:"php";s:3:"rel";s:2:"ge";s:7:"version";s:5:"4.3.2";s:8:"optional";s:2:"no";}i:1;a:6:{s:4:"type";s:3:"pkg";s:7:"channel";s:12:"pear.php.net";s:4:"name";s:4:"PEAR";s:3:"rel";s:2:"ge";s:7:"version";s:7:"1.4.0b1";s:8:"optional";s:2:"no";}i:2;a:6:{s:4:"type";s:3:"pkg";s:7:"channel";s:12:"pear.php.net";s:4:"name";s:4:"PEAR";s:3:"rel";s:2:"ge";s:7:"version";s:5:"1.3.6";s:8:"optional";s:2:"no";}}s:11:"maintainers";a:5:{i:0;a:5:{s:4:"name";s:17:"Lukas Kahwe Smith";s:5:"email";s:20:"smith@pooteeweet.org";s:6:"active";s:3:"yes";s:6:"handle";s:6:"lsmith";s:4:"role";s:4:"lead";}i:1;a:5:{s:4:"name";s:16:"Lorenzo Alberton";s:5:"email";s:19:"l.alberton@quipo.it";s:6:"active";s:3:"yes";s:6:"handle";s:5:"quipo";s:4:"role";s:9:"developer";}i:2;a:5:{s:4:"name";s:11:"Paul Cooper";s:5:"email";s:14:"pgc@ucecom.com";s:6:"active";s:3:"yes";s:6:"handle";s:3:"pgc";s:4:"role";s:11:"contributor";}i:3;a:5:{s:4:"name";s:16:"Daniel Convissor";s:5:"email";s:15:"danielc@php.net";s:6:"active";s:3:"yes";s:6:"handle";s:7:"danielc";s:4:"role";s:6:"helper";}i:4;a:5:{s:4:"name";s:14:"David Coallier";s:5:"email";s:17:"david@jaws.com.mx";s:6:"active";s:3:"yes";s:6:"handle";s:6:"davidc";s:4:"role";s:6:"helper";}}}s:10:"xsdversion";s:3:"2.0";s:13:"_lastmodified";i:1171608487;}catalog/libs/PEAR/.registry/net_useragent_detect.reg0000644577340101002240000001632010625427733024470 0ustar tonerlogicspg11675700000000000000a:23:{s:7:"attribs";a:6:{s:15:"packagerversion";s:5:"1.4.6";s:7:"version";s:3:"2.0";s:5:"xmlns";s:35:"http://pear.php.net/dtd/package-2.0";s:11:"xmlns:tasks";s:33:"http://pear.php.net/dtd/tasks-1.0";s:9:"xmlns:xsi";s:41:"http://www.w3.org/2001/XMLSchema-instance";s:18:"xsi:schemaLocation";s:147:"http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd";}s:4:"name";s:20:"Net_UserAgent_Detect";s:7:"channel";s:12:"pear.php.net";s:7:"summary";s:101:"Net_UserAgent_Detect determines the Web browser, version, and platform from an HTTP user agent string";s:11:"description";s:380:"The Net_UserAgent object does a number of tests on an HTTP user agent string. The results of these tests are available via methods of the object. This module is based upon the JavaScript browser detection code available at http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html. This module had many influences from the lib/Browser.php code in version 1.3 of Horde.";s:4:"lead";a:4:{s:4:"name";s:10:"Jason Rust";s:4:"user";s:5:"jrust";s:5:"email";s:13:"jrust@php.net";s:6:"active";s:3:"yes";}s:6:"helper";a:2:{i:0;a:4:{s:4:"name";s:9:"Dan Allen";s:4:"user";s:6:"dallen";s:5:"email";s:14:"dallen@php.net";s:6:"active";s:3:"yes";}i:1;a:4:{s:4:"name";s:11:"David Costa";s:4:"user";s:8:"gurugeek";s:5:"email";s:16:"gurugeek@php.net";s:6:"active";s:3:"yes";}}s:4:"date";s:10:"2006-04-19";s:4:"time";s:8:"11:48:55";s:7:"version";a:2:{s:7:"release";s:5:"2.2.0";s:3:"api";s:5:"2.2.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:322:"* Adding new "browsers" that make it easier to exclude old browsers: belowie6, belowns6, and belowopera8 * Additional browsers now supported: opera8, ie7, icab * Adding new "feature" which tells if a browser is AJAX enabled: ajax * IE 5 on Mac is now detected correctly as ie5 * Force override of the user agent now works.";s:8:"contents";a:1:{s:3:"dir";a:2:{s:7:"attribs";a:1:{s:4:"name";s:1:"/";}s:4:"file";a:2:{i:0;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:13:"Net/UserAgent";s:6:"md5sum";s:32:"42ea7cea6bff1e7de820975736ebc0ff";s:4:"name";s:17:"tests/example.php";s:4:"role";s:4:"test";}}i:1;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:13:"Net/UserAgent";s:6:"md5sum";s:32:"286683b74e0e63a81a53fe6f67eacf1d";s:4:"name";s:10:"Detect.php";s:4:"role";s:3:"php";}}}}}s:12:"dependencies";a:1:{s:8:"required";a:2:{s:3:"php";a:1:{s:3:"min";s:5:"4.1.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:7:"1.4.0b1";}}}s:10:"phprelease";s:0:"";s:9:"changelog";a:1:{s:7:"release";a:4:{i:0;a:5:{s:7:"version";a:2:{s:7:"release";s:3:"1.0";s:3:"api";s:3:"1.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2002-05-21";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:8:"PHP 2.01";}s:5:"notes";s:45:"This is the initial independent PEAR release.";}i:1;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.0.1";s:3:"api";s:5:"2.0.1";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2004-03-11";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:22:"http://www.example.com";}s:8:"_content";s:8:"PHP 2.01";}s:5:"notes";s:328:"* Made it PHP5 compatible in a way that is BC * Added support for Safari * Bumped konq's javascript version up to 1.4 * Fix bug where w3m caused warnings * fixed a notice error when the user agent is empty * Fixed missing windows xp detection and added nested_table_render_bug quirk for netscape 4.8 and below. * Code cleanups.";}i:2;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.1.0";s:3:"api";s:5:"2.1.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2005-04-18";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:384:"* Added support for firefox, opera6, opera7, aol8, webdav, netgem/iplayer, and win2003 * The getQuirk() method now works correctly * Normally all browser information is cached the first time Net_UserAgent_Detect is run on a page to make it as speedy as possible. However, in some case there is need to clear the cached data. This can now be done by setting the "re-evaluate" option.";}i:3;a:5:{s:7:"version";a:2:{s:7:"release";s:5:"2.2.0";s:3:"api";s:5:"2.2.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2006-04-19";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:26:"http://www.php.net/license";}s:8:"_content";s:11:"PHP License";}s:5:"notes";s:322:"* Adding new "browsers" that make it easier to exclude old browsers: belowie6, belowns6, and belowopera8 * Additional browsers now supported: opera8, ie7, icab * Adding new "feature" which tells if a browser is AJAX enabled: ajax * IE 5 on Mac is now detected correctly as ie5 * Force override of the user agent now works.";}}}s:8:"filelist";a:2:{s:17:"tests/example.php";a:5:{s:14:"baseinstalldir";s:13:"Net/UserAgent";s:6:"md5sum";s:32:"42ea7cea6bff1e7de820975736ebc0ff";s:4:"name";s:17:"tests/example.php";s:4:"role";s:4:"test";s:12:"installed_as";s:83:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\Net_UserAgent_Detect\tests\example.php";}s:10:"Detect.php";a:5:{s:14:"baseinstalldir";s:13:"Net/UserAgent";s:6:"md5sum";s:32:"286683b74e0e63a81a53fe6f67eacf1d";s:4:"name";s:10:"Detect.php";s:4:"role";s:3:"php";s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Net\UserAgent\Detect.php";}}s:12:"_lastversion";s:5:"2.2.0";s:7:"dirtree";a:5:{s:71:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\Net_UserAgent_Detect\tests";b:1;s:71:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\tests\Net_UserAgent_Detect\tests";b:1;s:52:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Net\UserAgent";b:1;s:52:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\Net\UserAgent";b:1;s:42:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\Net";b:1;}s:3:"old";a:7:{s:7:"version";s:5:"2.2.0";s:12:"release_date";s:10:"2006-04-19";s:13:"release_state";s:6:"stable";s:15:"release_license";s:11:"PHP License";s:13:"release_notes";s:322:"* Adding new "browsers" that make it easier to exclude old browsers: belowie6, belowns6, and belowopera8 * Additional browsers now supported: opera8, ie7, icab * Adding new "feature" which tells if a browser is AJAX enabled: ajax * IE 5 on Mac is now detected correctly as ie5 * Force override of the user agent now works.";s:12:"release_deps";a:2:{i:0;a:4:{s:4:"type";s:3:"php";s:3:"rel";s:2:"ge";s:7:"version";s:5:"4.1.0";s:8:"optional";s:2:"no";}i:1;a:6:{s:4:"type";s:3:"pkg";s:7:"channel";s:12:"pear.php.net";s:4:"name";s:4:"PEAR";s:3:"rel";s:2:"ge";s:7:"version";s:7:"1.4.0b1";s:8:"optional";s:2:"no";}}s:11:"maintainers";a:3:{i:0;a:5:{s:4:"name";s:10:"Jason Rust";s:5:"email";s:13:"jrust@php.net";s:6:"active";s:3:"yes";s:6:"handle";s:5:"jrust";s:4:"role";s:4:"lead";}i:1;a:5:{s:4:"name";s:9:"Dan Allen";s:5:"email";s:14:"dallen@php.net";s:6:"active";s:3:"yes";s:6:"handle";s:6:"dallen";s:4:"role";s:6:"helper";}i:2;a:5:{s:4:"name";s:11:"David Costa";s:5:"email";s:16:"gurugeek@php.net";s:6:"active";s:3:"yes";s:6:"handle";s:8:"gurugeek";s:4:"role";s:6:"helper";}}}s:10:"xsdversion";s:3:"2.0";s:13:"_lastmodified";i:1171608481;}catalog/libs/PEAR/.registry/pear.reg0000644577340101002240000012207110625427737021231 0ustar tonerlogicspg11675700000000000000a:18:{s:8:"provides";a:3:{s:14:"class;OS_Guess";a:3:{s:4:"type";s:5:"class";s:4:"name";s:8:"OS_Guess";s:8:"explicit";b:1;}s:12:"class;System";a:3:{s:4:"type";s:5:"class";s:4:"name";s:6:"System";s:8:"explicit";b:1;}s:17:"function;md5_file";a:3:{s:4:"type";s:8:"function";s:4:"name";s:8:"md5_file";s:8:"explicit";b:1;}}s:8:"filelist";a:96:{s:12:"OS/Guess.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:51:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\OS\Guess.php";}s:27:"PEAR/ChannelFile/Parser.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\ChannelFile\Parser.php";}s:21:"PEAR/Command/Auth.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Auth.xml";}s:21:"PEAR/Command/Auth.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Auth.php";}s:22:"PEAR/Command/Build.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:61:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Build.xml";}s:22:"PEAR/Command/Build.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:61:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Build.php";}s:25:"PEAR/Command/Channels.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:64:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Channels.xml";}s:25:"PEAR/Command/Channels.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:64:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Channels.php";}s:23:"PEAR/Command/Common.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Common.php";}s:23:"PEAR/Command/Config.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Config.xml";}s:23:"PEAR/Command/Config.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Config.php";}s:24:"PEAR/Command/Install.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Install.xml";}s:24:"PEAR/Command/Install.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Install.php";}s:24:"PEAR/Command/Package.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Package.xml";}s:24:"PEAR/Command/Package.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:2:{i:0;a:3:{s:4:"from";s:10:"@DATA-DIR@";s:2:"to";s:8:"data_dir";s:4:"type";s:11:"pear-config";}i:1;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Package.php";}s:23:"PEAR/Command/Pickle.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Pickle.xml";}s:23:"PEAR/Command/Pickle.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Pickle.php";}s:25:"PEAR/Command/Registry.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:64:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Registry.xml";}s:25:"PEAR/Command/Registry.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:64:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Registry.php";}s:23:"PEAR/Command/Remote.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Remote.xml";}s:23:"PEAR/Command/Remote.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Remote.php";}s:23:"PEAR/Command/Mirror.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Mirror.xml";}s:23:"PEAR/Command/Mirror.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Mirror.php";}s:21:"PEAR/Command/Test.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Test.xml";}s:21:"PEAR/Command/Test.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command\Test.php";}s:27:"PEAR/Downloader/Package.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:10:"@PEAR-VER@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Downloader\Package.php";}s:21:"PEAR/Frontend/CLI.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\CLI.php";}s:30:"PEAR/Installer/Role/Common.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Common.php";}s:28:"PEAR/Installer/Role/Data.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Data.xml";}s:28:"PEAR/Installer/Role/Data.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Data.php";}s:27:"PEAR/Installer/Role/Doc.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Doc.xml";}s:27:"PEAR/Installer/Role/Doc.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Doc.php";}s:27:"PEAR/Installer/Role/Ext.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Ext.xml";}s:27:"PEAR/Installer/Role/Ext.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Ext.php";}s:27:"PEAR/Installer/Role/Php.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Php.xml";}s:27:"PEAR/Installer/Role/Php.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Php.php";}s:30:"PEAR/Installer/Role/Script.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Script.xml";}s:30:"PEAR/Installer/Role/Script.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Script.php";}s:27:"PEAR/Installer/Role/Src.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Src.xml";}s:27:"PEAR/Installer/Role/Src.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Src.php";}s:28:"PEAR/Installer/Role/Test.xml";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Test.xml";}s:28:"PEAR/Installer/Role/Test.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role\Test.php";}s:23:"PEAR/Installer/Role.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role.php";}s:33:"PEAR/PackageFile/Generator/v1.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:10:"@PEAR-VER@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:72:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\Generator\v1.php";}s:33:"PEAR/PackageFile/Generator/v2.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:10:"@PEAR-VER@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:72:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\Generator\v2.php";}s:30:"PEAR/PackageFile/Parser/v1.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\Parser\v1.php";}s:30:"PEAR/PackageFile/Parser/v2.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\Parser\v2.php";}s:26:"PEAR/PackageFile/v2/rw.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\v2\rw.php";}s:33:"PEAR/PackageFile/v2/Validator.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:72:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\v2\Validator.php";}s:23:"PEAR/PackageFile/v1.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\v1.php";}s:23:"PEAR/PackageFile/v2.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\v2.php";}s:16:"PEAR/REST/10.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\REST\10.php";}s:16:"PEAR/REST/11.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\REST\11.php";}s:34:"PEAR/Task/Postinstallscript/rw.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:73:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Postinstallscript\rw.php";}s:24:"PEAR/Task/Replace/rw.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Replace\rw.php";}s:24:"PEAR/Task/Unixeol/rw.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Unixeol\rw.php";}s:27:"PEAR/Task/Windowseol/rw.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Windowseol\rw.php";}s:20:"PEAR/Task/Common.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Common.php";}s:31:"PEAR/Task/Postinstallscript.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Postinstallscript.php";}s:21:"PEAR/Task/Replace.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Replace.php";}s:21:"PEAR/Task/Unixeol.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Unixeol.php";}s:24:"PEAR/Task/Windowseol.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:63:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Windowseol.php";}s:23:"PEAR/Validator/PECL.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Validator\PECL.php";}s:19:"PEAR/Autoloader.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Autoloader.php";}s:16:"PEAR/Builder.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:10:"@PEAR-VER@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Builder.php";}s:20:"PEAR/ChannelFile.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\ChannelFile.php";}s:16:"PEAR/Command.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command.php";}s:15:"PEAR/Common.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:54:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Common.php";}s:15:"PEAR/Config.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:54:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Config.php";}s:19:"PEAR/Dependency.php";a:2:{s:4:"role";s:3:"php";s:12:"installed_as";s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Dependency.php";}s:21:"PEAR/DependencyDB.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\DependencyDB.php";}s:20:"PEAR/Dependency2.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:10:"@PEAR-VER@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Dependency2.php";}s:19:"PEAR/Downloader.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Downloader.php";}s:19:"PEAR/ErrorStack.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\ErrorStack.php";}s:18:"PEAR/Exception.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:57:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Exception.php";}s:17:"PEAR/Frontend.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend.php";}s:18:"PEAR/Installer.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:57:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer.php";}s:17:"PEAR/Packager.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Packager.php";}s:20:"PEAR/PackageFile.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:10:"@PEAR-VER@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile.php";}s:17:"PEAR/Registry.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Registry.php";}s:15:"PEAR/Remote.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:54:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Remote.php";}s:13:"PEAR/REST.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:52:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\REST.php";}s:16:"PEAR/RunTest.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\RunTest.php";}s:17:"PEAR/Validate.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Validate.php";}s:18:"PEAR/XMLParser.php";a:3:{s:4:"role";s:3:"php";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:57:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\XMLParser.php";}s:19:"scripts/peardev.bat";a:6:{s:4:"role";s:6:"script";s:14:"baseinstalldir";s:1:"/";s:8:"platform";s:7:"windows";s:10:"install-as";s:11:"peardev.bat";s:12:"replacements";a:3:{i:0;a:3:{s:4:"from";s:9:"@bin_dir@";s:2:"to";s:7:"bin_dir";s:4:"type";s:11:"pear-config";}i:1;a:3:{s:4:"from";s:9:"@php_bin@";s:2:"to";s:7:"php_bin";s:4:"type";s:11:"pear-config";}i:2;a:3:{s:4:"from";s:14:"@include_path@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}}s:12:"installed_as";s:45:"D:\Apache2\htdocs\tshirtshop\libs\peardev.bat";}s:16:"scripts/pear.bat";a:6:{s:4:"role";s:6:"script";s:14:"baseinstalldir";s:1:"/";s:8:"platform";s:7:"windows";s:10:"install-as";s:8:"pear.bat";s:12:"replacements";a:3:{i:0;a:3:{s:4:"from";s:9:"@bin_dir@";s:2:"to";s:7:"bin_dir";s:4:"type";s:11:"pear-config";}i:1;a:3:{s:4:"from";s:9:"@php_bin@";s:2:"to";s:7:"php_bin";s:4:"type";s:11:"pear-config";}i:2;a:3:{s:4:"from";s:14:"@include_path@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}}s:12:"installed_as";s:42:"D:\Apache2\htdocs\tshirtshop\libs\pear.bat";}s:16:"scripts/pecl.bat";a:6:{s:4:"role";s:6:"script";s:14:"baseinstalldir";s:1:"/";s:8:"platform";s:7:"windows";s:10:"install-as";s:8:"pecl.bat";s:12:"replacements";a:3:{i:0;a:3:{s:4:"from";s:9:"@bin_dir@";s:2:"to";s:7:"bin_dir";s:4:"type";s:11:"pear-config";}i:1;a:3:{s:4:"from";s:9:"@php_bin@";s:2:"to";s:7:"php_bin";s:4:"type";s:11:"pear-config";}i:2;a:3:{s:4:"from";s:14:"@include_path@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}}s:12:"installed_as";s:42:"D:\Apache2\htdocs\tshirtshop\libs\pecl.bat";}s:19:"scripts/pearcmd.php";a:5:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:1:"/";s:10:"install-as";s:11:"pearcmd.php";s:12:"replacements";a:4:{i:0;a:3:{s:4:"from";s:9:"@php_bin@";s:2:"to";s:7:"php_bin";s:4:"type";s:11:"pear-config";}i:1;a:3:{s:4:"from";s:9:"@php_dir@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}i:2;a:3:{s:4:"from";s:14:"@pear_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}i:3;a:3:{s:4:"from";s:14:"@include_path@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}}s:12:"installed_as";s:50:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\pearcmd.php";}s:19:"scripts/peclcmd.php";a:5:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:1:"/";s:10:"install-as";s:11:"peclcmd.php";s:12:"replacements";a:4:{i:0;a:3:{s:4:"from";s:9:"@php_bin@";s:2:"to";s:7:"php_bin";s:4:"type";s:11:"pear-config";}i:1;a:3:{s:4:"from";s:9:"@php_dir@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}i:2;a:3:{s:4:"from";s:14:"@pear_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}i:3;a:3:{s:4:"from";s:14:"@include_path@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}}s:12:"installed_as";s:50:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\peclcmd.php";}s:7:"INSTALL";a:3:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:1:"/";s:12:"installed_as";s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\PEAR\INSTALL";}s:11:"package.dtd";a:3:{s:4:"role";s:4:"data";s:14:"baseinstalldir";s:1:"/";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\PEAR\package.dtd";}s:13:"template.spec";a:3:{s:4:"role";s:4:"data";s:14:"baseinstalldir";s:1:"/";s:12:"installed_as";s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\PEAR\template.spec";}s:8:"PEAR.php";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:1:"/";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:47:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR.php";}s:6:"README";a:3:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:1:"/";s:12:"installed_as";s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\PEAR\README";}s:10:"System.php";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:1:"/";s:12:"replacements";a:1:{i:0;a:3:{s:4:"from";s:17:"@package_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}}s:12:"installed_as";s:49:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\System.php";}}s:10:"xsdversion";s:3:"1.0";s:15:"packagerversion";s:8:"1.5.0RC3";s:7:"package";s:4:"PEAR";s:7:"summary";s:16:"PEAR Base System";s:11:"description";s:1254:"The PEAR package contains: * the PEAR installer, for creating, distributing and installing packages * the PEAR_Exception PHP5 error handling mechanism * the PEAR_ErrorStack advanced error handling mechanism * the PEAR_Error error handling mechanism * the OS_Guess class for retrieving info about the OS where PHP is running on * the System class for quick handling of common operations with files and directories * the PEAR base class New features in a nutshell: * full support for channels * pre-download dependency validation * new package.xml 2.0 format allows tremendous flexibility while maintaining BC * support for optional dependency groups and limited support for sub-packaging * robust dependency support * full dependency validation on uninstall * remote install for hosts with only ftp access - no more problems with restricted host installation * full support for mirroring * support for bundling several packages into a single tarball * support for static dependencies on a url-based package * support for custom file roles and installation tasks NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations to the latest version, or PEAR will not upgrade properly ";s:11:"maintainers";a:7:{i:0;a:4:{s:6:"handle";s:6:"cellog";s:4:"name";s:11:"Greg Beaver";s:5:"email";s:14:"cellog@php.net";s:4:"role";s:4:"lead";}i:1;a:4:{s:6:"handle";s:6:"pajoye";s:4:"name";s:17:"Pierre-Alain Joye";s:5:"email";s:14:"pierre@php.net";s:4:"role";s:4:"lead";}i:2;a:4:{s:6:"handle";s:3:"ssb";s:4:"name";s:11:"Stig Bakken";s:5:"email";s:12:"stig@php.net";s:4:"role";s:4:"lead";}i:3;a:4:{s:6:"handle";s:3:"cox";s:4:"name";s:13:"Tomas V.V.Cox";s:5:"email";s:15:"cox@idecnet.com";s:4:"role";s:4:"lead";}i:4;a:4:{s:6:"handle";s:4:"timj";s:4:"name";s:11:"Tim Jackson";s:5:"email";s:12:"timj@php.net";s:4:"role";s:6:"helper";}i:5;a:4:{s:6:"handle";s:5:"toggg";s:4:"name";s:15:"Bertrand Gugger";s:5:"email";s:13:"toggg@php.net";s:4:"role";s:6:"helper";}i:6;a:4:{s:6:"handle";s:2:"mj";s:4:"name";s:13:"Martin Jansen";s:5:"email";s:10:"mj@php.net";s:4:"role";s:6:"helper";}}s:7:"version";s:5:"1.5.0";s:12:"release_date";s:10:"2007-01-23";s:15:"release_license";s:11:"PHP License";s:13:"release_state";s:6:"stable";s:13:"release_notes";s:5090:"Minor feature addition release The following bugs in 1.5.0RC3 were fixed: * fix Bug #7941: Bogus error message when uninstalling subpackages * fix Bug #9761: $php_errormsg not being filled properly * fix Bug #9763: Upgrading PECL packages fails when chmoding .so * fix Bug #9791: Warning: Wrong parameter count for array_key_exists() in PEAR/Builder.php on li * fix Bug #9824: pear install Structures_DataGrid#renderers recursion crash * fix Bug #9825: install 2 opt groups leaves duplicate parent package New features since 1.4.11: * implement Request #3436: implement staticPop [PEAR_Error_Stack] * implement Request #6396: add extension enabling in php.ini for 1.5.0 * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default * implement Request #6702: implement TAP output option for run-tests command (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) * implement Request #7090: PEAR_Downloader mustn't contact pear server when installing local package file * implement Request #7220: recognize deprecated package/channel and display to user * implement Request #7352: add a README and an INSTALL by pear * implement Request #7910: "Last Installed Version" should be "Previous Installed Version" * implement Request #7912: PEAR_Exception detect PEAR_Error as $message in __construct() * implement Request #8779: add package.xml 2.1 support for zend extensions * implement Request #8827: add a yesno type handling for post-install scripts * Structures_Graph is now a required dependency (1.0.2 or newer) for sorting of dependencies upon installation * update Archive_Tar recommended version to 1.3.2 * update Console_Getopt recommended version to 1.2.1 Bugs fixed since 1.4.11: * fix Bug #6788: backtrace memory leak * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 * fix Bug #7021: Everything must be within * fix Bug #7196: PEAR crashes when using autoload_prepend_file * fix Bug #7203: pecl install does not use the correct ext_dir * fix Bug #7207: proxy user/pass is not urldecoded in download * fix Bug #7219: bogus "will download PEAR 1.4.8" error * fix Bug #7221: pear install blah-alpha won't install a newer stable * fix Bug #7351: setting custom config variable in a channel fails * fix Bug #7368: undefined function: getProvidesextension() * fix Bug #7385: if post-install script or extension are present and --packagingroot, fatal erro * fix Bug #7419: Check inputs in PEAR_PackageFile_v2_rw * fix Bug #7464: run-scripts causes notices * fix Bug #7539: if a file has both install-as and ignore notices * fix Bug #7726: dependency is broken * fix Bug #7896: can't download packages, neither from cli or from web page. * fix Bug #7931: hasErrors() with an error level has returned true after invoking pop(). * fix Bug #7940: pear download fails silently * fix Bug #8254: downloading doesn't work with 302 messages * fix Bug #8383: No exit code on errors * fix Bug #8384: PEAR_PackageFile doesn't include error messages from Archive_Tar * fix Bug #8516: PEAR_Config->get('preferred_mirror', null, 'non-pear.channel') returns pear * fix Bug #8617: pear download prints (-1 bytes) if no content-length has been sent (Bjori, Pierre) * fix Bug #8620: typo error in PEAR_PackageFile_v2::getConfigureOptions() * fix Bug #8622: PFM2 - wrong php exclude version is not detected * fix Bug #8519: typo in PEAR/Start.php OS_WINDOWS not WINDOWS * fix Bug #8553: PEAR_Installer_Role_Common::processInstallation() does not honor layer * fix Bug #8571: Sparse error message in registry * fix Bug #8788: fatal error in Installer.php when task is not found * fix Bug #8794: upgrade-all including Auth fails with fatal error * fix Bug #9101: PEAR_Exception::getCauseMessage() failure with a nested Exception (Adam Harvey) * fix Bug #9135: pear bundle fails if php_dir is not writeable * fix Bug #9182: can't add versioning to conflicting deps in PEAR_PF_v2_rw * fix Bug #9206: PEAR package info is not retrieved correctly for package with single release * fix Bug #9208: Typo error on abstract PEAR_Task_Common::validXml() method * fix Bug #9280: cannot install with --packagingroot package from non-php.net channel * fix Bug #9307: Validator generates warning on empty tag * fix Bug #9355: Bug in GLIBC detection (OS/Guess.php), patch proposal * fix Bug #9551: listing packages in pear.geeklog.net fails * fix Bug #9660: dependency sorting on installation does not always work * fix Bug #9688: [PATCH] Fix build of PECL extensions * fix Bug #9695: sgl-list-all command problem * fix Bug #9712: pear uninstall --register-only remove file : it should not * fix Bug #9757: pear does not validate -d input (pear -d php_dir=whatever command) * fix shell-test command with invalid usage (noticed by Christian Weiske) * fix notice when running "pear sign" (noticed by Christian Weiske) ";s:12:"release_deps";a:10:{i:1;a:3:{s:4:"type";s:3:"php";s:3:"rel";s:2:"ge";s:7:"version";s:5:"4.3.0";}i:2;a:4:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:5:"1.3.3";s:4:"name";s:4:"PEAR";}i:3;a:4:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:5:"1.3.1";s:4:"name";s:11:"Archive_Tar";}i:4;a:4:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:3:"1.2";s:4:"name";s:14:"Console_Getopt";}i:5;a:4:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:5:"1.0.2";s:4:"name";s:16:"Structures_Graph";}i:6;a:5:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:5:"1.4.0";s:8:"optional";s:3:"yes";s:4:"name";s:7:"XML_RPC";}i:7;a:5:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:5:"0.5.0";s:8:"optional";s:3:"yes";s:4:"name";s:17:"PEAR_Frontend_Web";}i:8;a:5:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:5:"0.4.0";s:8:"optional";s:3:"yes";s:4:"name";s:17:"PEAR_Frontend_Gtk";}i:9;a:3:{s:4:"type";s:3:"ext";s:3:"rel";s:3:"has";s:4:"name";s:3:"xml";}i:10;a:3:{s:4:"type";s:3:"ext";s:3:"rel";s:3:"has";s:4:"name";s:4:"pcre";}}s:9:"changelog";a:4:{i:0;a:5:{s:7:"version";s:7:"1.5.0a1";s:12:"release_date";s:10:"2006-09-30";s:15:"release_license";s:11:"PHP License";s:13:"release_state";s:5:"alpha";s:13:"release_notes";s:2831:"Minor feature addition/bugfixes * fix Bug #6788: backtrace memory leak * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 * fix Bug #7021: Everything must be within * fix Bug #7196: PEAR crashes when using autoload_prepend_file * fix Bug #7203: pecl install does not use the correct ext_dir * fix Bug #7207: proxy user/pass is not urldecoded in download * fix Bug #7219: bogus "will download PEAR 1.4.8" error * fix Bug #7221: pear install blah-alpha won't install a newer stable * fix Bug #7351: setting custom config variable in a channel fails * fix Bug #7368: undefined function: getProvidesextension() * fix Bug #7385: if post-install script or extension are present and --packagingroot, fatal erro * fix Bug #7419: Check inputs in PEAR_PackageFile_v2_rw * fix Bug #7464: run-scripts causes notices * fix Bug #7539: if a file has both install-as and ignore notices * fix Bug #7726: dependency is broken * fix Bug #7896: can't download packages, neither from cli or from web page. * fix Bug #7931: hasErrors() with an error level has returned true after invoking pop(). * fix Bug #7940: pear download fails silently * fix Bug #8254: downloading doesn't work with 302 messages * fix Bug #8383: No exit code on errors * fix Bug #8384: PEAR_PackageFile doesn't include error messages from Archive_Tar * fix Bug #8516: PEAR_Config->get('preferred_mirror', null, 'non-pear.channel') returns pear * fix Bug #8617: pear download prints (-1 bytes) if no content-length has been sent (Bjori, Pierre) * fix Bug #8620: typo error in PEAR_PackageFile_v2::getConfigureOptions() * fix Bug #8622: PFM2 - wrong php exclude version is not detected * fix Bug #8519: typo in PEAR/Start.php OS_WINDOWS not WINDOWS * fix Bug #8571: Sparse error message in registry * fix Bug #8788: fatal error in Installer.php when task is not found * implement Request #3436: implement staticPop [PEAR_Error_Stack] * implement Request #6396: add extension enabling in php.ini for 1.5.0 * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default * implement Request #6702: implement TAP output option for run-tests command (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) * implement Request #7090: PEAR_Downloader mustn't contact pear server when installing local package file * implement Request #7220: recognize deprecated package/channel and display to user * implement Request #7352: add a README and an INSTALL by pear * implement Request #7910: "Last Installed Version" should be "Previous Installed Version" * implement Request #7912: PEAR_Exception detect PEAR_Error as $message in __construct() * implement Request #8779: add package.xml 2.1 support for zend extensions ";}i:1;a:5:{s:7:"version";s:8:"1.5.0RC1";s:12:"release_date";s:10:"2006-11-27";s:15:"release_license";s:11:"PHP License";s:13:"release_state";s:4:"beta";s:13:"release_notes";s:1109:"Minor feature addition, freeze API and prepare for 1.5.0 stable * fix Bug #8553: PEAR_Installer_Role_Common::processInstallation() does not honor layer * fix Bug #8794: upgrade-all including Auth fails with fatal error * fix Bug #9101: PEAR_Exception::getCauseMessage() failure with a nested Exception (Adam Harvey) * fix Bug #9135: pear bundle fails if php_dir is not writeable * fix Bug #9182: can't add versioning to conflicting deps in PEAR_PF_v2_rw * fix Bug #9206: PEAR package info is not retrieved correctly for package with single release * fix Bug #9208: Typo error on abstract PEAR_Task_Common::validXml() method * fix Bug #9280: cannot install with --packagingroot package from non-php.net channel * fix Bug #9307: Validator generates warning on empty tag * fix Bug #9355: Bug in GLIBC detection (OS/Guess.php), patch proposal * fix shell-test command with invalid usage (noticed by Christian Weiske) * fix notice when running "pear sign" (noticed by Christian Weiske) * implement Request #8827: add a yesno type handling for post-install scripts ";}i:2;a:5:{s:7:"version";s:8:"1.5.0RC2";s:12:"release_date";s:10:"2006-12-14";s:15:"release_license";s:11:"PHP License";s:13:"release_state";s:4:"beta";s:13:"release_notes";s:111:"* fully fix Bug #9355: Bug in GLIBC detection * fix Bug #9551: listing packages in pear.geeklog.net fails ";}i:3;a:5:{s:7:"version";s:8:"1.5.0RC3";s:12:"release_date";s:10:"2007-01-07";s:15:"release_license";s:11:"PHP License";s:13:"release_state";s:4:"beta";s:13:"release_notes";s:554:"* Structures_Graph is now a required dependency (1.0.2 or newer) for sorting of dependencies upon installation * update Archive_Tar recommended version to 1.3.2 * update Console_Getopt recommended version to 1.2.1 * fix Bug #9660: dependency sorting on installation does not always work * fix Bug #9688: [PATCH] Fix build of PECL extensions * fix Bug #9695: sgl-list-all command problem * fix Bug #9712: pear uninstall --register-only remove file : it should not * fix Bug #9757: pear does not validate -d input (pear -d php_dir=whatever command) ";}}s:12:"_lastversion";s:5:"1.5.0";s:7:"dirtree";a:42:{s:41:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\OS";b:1;s:41:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\OS";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\ChannelFile";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\ChannelFile";b:1;s:43:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR";b:1;s:51:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Command";b:1;s:51:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Command";b:1;s:54:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Downloader";b:1;s:54:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Downloader";b:1;s:52:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend";b:1;s:52:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Frontend";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer\Role";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Installer\Role";b:1;s:53:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Installer";b:1;s:53:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Installer";b:1;s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\Generator";b:1;s:65:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\PackageFile\Generator";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\PackageFile";b:1;s:62:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\Parser";b:1;s:62:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\PackageFile\Parser";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile\v2";b:1;s:58:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\PackageFile\v2";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\PackageFile";b:1;s:48:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\REST";b:1;s:48:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\REST";b:1;s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Postinstallscript";b:1;s:66:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Task\Postinstallscript";b:1;s:48:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Task";b:1;s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Replace";b:1;s:56:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Task\Replace";b:1;s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Unixeol";b:1;s:56:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Task\Unixeol";b:1;s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task\Windowseol";b:1;s:59:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Task\Windowseol";b:1;s:48:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Task";b:1;s:53:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Validator";b:1;s:53:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Validator";b:1;s:43:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR";b:1;s:33:"D:\Apache2\htdocs\tshirtshop\libs";b:1;s:38:"D:\Apache2\htdocs\tshirtshop\libs\PEAR";b:1;s:48:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\PEAR";b:1;s:48:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\PEAR";b:1;}s:13:"_lastmodified";i:1171608471;}catalog/libs/PEAR/.registry/pear_frontend_web.reg0000644577340101002240000003624510625427741023767 0ustar tonerlogicspg11675700000000000000a:18:{s:8:"provides";a:19:{s:23:"class;PEAR_Frontend_Web";a:4:{s:4:"type";s:5:"class";s:4:"name";s:17:"PEAR_Frontend_Web";s:7:"extends";s:13:"PEAR_Frontend";s:8:"explicit";b:1;}s:37:"function;PEAR_Frontend_Web::setConfig";a:3:{s:4:"type";s:8:"function";s:4:"name";s:28:"PEAR_Frontend_Web::setConfig";s:8:"explicit";b:1;}s:39:"function;PEAR_Frontend_Web::displayLine";a:3:{s:4:"type";s:8:"function";s:4:"name";s:30:"PEAR_Frontend_Web::displayLine";s:8:"explicit";b:1;}s:35:"function;PEAR_Frontend_Web::display";a:3:{s:4:"type";s:8:"function";s:4:"name";s:26:"PEAR_Frontend_Web::display";s:8:"explicit";b:1;}s:39:"function;PEAR_Frontend_Web::userConfirm";a:3:{s:4:"type";s:8:"function";s:4:"name";s:30:"PEAR_Frontend_Web::userConfirm";s:8:"explicit";b:1;}s:40:"function;PEAR_Frontend_Web::displayStart";a:3:{s:4:"type";s:8:"function";s:4:"name";s:31:"PEAR_Frontend_Web::displayStart";s:8:"explicit";b:1;}s:40:"function;PEAR_Frontend_Web::displayError";a:3:{s:4:"type";s:8:"function";s:4:"name";s:31:"PEAR_Frontend_Web::displayError";s:8:"explicit";b:1;}s:45:"function;PEAR_Frontend_Web::displayFatalError";a:3:{s:4:"type";s:8:"function";s:4:"name";s:36:"PEAR_Frontend_Web::displayFatalError";s:8:"explicit";b:1;}s:43:"function;PEAR_Frontend_Web::displayErrorImg";a:3:{s:4:"type";s:8:"function";s:4:"name";s:34:"PEAR_Frontend_Web::displayErrorImg";s:8:"explicit";b:1;}s:38:"function;PEAR_Frontend_Web::outputData";a:3:{s:4:"type";s:8:"function";s:4:"name";s:29:"PEAR_Frontend_Web::outputData";s:8:"explicit";b:1;}s:40:"function;PEAR_Frontend_Web::startSession";a:3:{s:4:"type";s:8:"function";s:4:"name";s:31:"PEAR_Frontend_Web::startSession";s:8:"explicit";b:1;}s:40:"function;PEAR_Frontend_Web::finishOutput";a:3:{s:4:"type";s:8:"function";s:4:"name";s:31:"PEAR_Frontend_Web::finishOutput";s:8:"explicit";b:1;}s:49:"function;PEAR_Frontend_Web::runPostinstallScripts";a:3:{s:4:"type";s:8:"function";s:4:"name";s:40:"PEAR_Frontend_Web::runPostinstallScripts";s:8:"explicit";b:1;}s:42:"function;PEAR_Frontend_Web::skipParamgroup";a:3:{s:4:"type";s:8:"function";s:4:"name";s:33:"PEAR_Frontend_Web::skipParamgroup";s:8:"explicit";b:1;}s:44:"function;PEAR_Frontend_Web::runInstallScript";a:3:{s:4:"type";s:8:"function";s:4:"name";s:35:"PEAR_Frontend_Web::runInstallScript";s:8:"explicit";b:1;}s:41:"function;PEAR_Frontend_Web::confirmDialog";a:3:{s:4:"type";s:8:"function";s:4:"name";s:32:"PEAR_Frontend_Web::confirmDialog";s:8:"explicit";b:1;}s:38:"function;PEAR_Frontend_Web::userDialog";a:3:{s:4:"type";s:8:"function";s:4:"name";s:29:"PEAR_Frontend_Web::userDialog";s:8:"explicit";b:1;}s:31:"function;PEAR_Frontend_Web::log";a:3:{s:4:"type";s:8:"function";s:4:"name";s:22:"PEAR_Frontend_Web::log";s:8:"explicit";b:1;}s:46:"function;PEAR_Frontend_Web::outputFrontendFile";a:3:{s:4:"type";s:8:"function";s:4:"name";s:37:"PEAR_Frontend_Web::outputFrontendFile";s:8:"explicit";b:1;}}s:8:"filelist";a:38:{s:16:"WebInstaller.php";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"3fc68406519a99e5156d1d24a4771e34";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\WebInstaller.php";}s:16:"Frontend/Web.php";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"45a6f10f93d1da4be088c0d0d21350b3";s:12:"installed_as";s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web.php";}s:23:"Frontend/Web/config.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"89fbaf12b03630cde8fab8f582a2013e";s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\config.gif";}s:25:"Frontend/Web/download.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"917c5480d7887a45fb7ee9e75ffdc90f";s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\download.gif";}s:22:"Frontend/Web/error.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"b7910926d28d2174f766edcd5b0203f3";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\error.gif";}s:21:"Frontend/Web/info.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"a9fd915f941d8b2767a86a7b86c1157d";s:12:"installed_as";s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\info.gif";}s:25:"Frontend/Web/infoplus.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"25ea72ec541af2d75e1c6084bb51c799";s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\infoplus.gif";}s:24:"Frontend/Web/install.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"bf40b1ad414777f2ec1ffd8f49db8cb8";s:12:"installed_as";s:68:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\install.gif";}s:29:"Frontend/Web/install_fail.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"3d5ed1a26b7ba8c9d144d289e40359dd";s:12:"installed_as";s:73:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\install_fail.gif";}s:27:"Frontend/Web/install_ok.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"b1bd4bab6452562b624834691a2537c6";s:12:"installed_as";s:71:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\install_ok.gif";}s:29:"Frontend/Web/install_wait.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"7b0098f037a686f02b925333a30161e9";s:12:"installed_as";s:73:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\install_wait.gif";}s:22:"Frontend/Web/login.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"06f6632208ac488b25c582100d97d03d";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\login.gif";}s:23:"Frontend/Web/logout.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"b6ec4b263faa470ff1150637b0d7c63e";s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\logout.gif";}s:23:"Frontend/Web/manual.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"5ba6a3c23adbac610cc2d5059402a0d2";s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\manual.gif";}s:26:"Frontend/Web/pearsmall.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"1f0ca8116ffeafac272a3f1a8325e408";s:12:"installed_as";s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\pearsmall.gif";}s:22:"Frontend/Web/trash.gif";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"5c897611197c28498c03da298e5558d7";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\trash.gif";}s:24:"Frontend/Web/package.jpg";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"a059eafc2fb95b0ca42977e29d391cff";s:12:"installed_as";s:68:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\package.jpg";}s:25:"Frontend/Web/category.jpg";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"77605580daff87d2ea0855db327aab3c";s:12:"installed_as";s:69:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\category.jpg";}s:24:"Frontend/Web/pkglist.png";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"3bed4b639af3ba0b136c0201ac505a7b";s:12:"installed_as";s:68:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\pkglist.png";}s:26:"Frontend/Web/pkgsearch.png";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"7f8ff108546c678f59f6b8c88ab43c92";s:12:"installed_as";s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\pkgsearch.png";}s:22:"Frontend/Web/style.css";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"d305a1953c27a074c245603aab0666af";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\style.css";}s:22:"Frontend/Web/dhtml.css";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"0a6b2a4e941c8229b3070b3e24cc9a39";s:12:"installed_as";s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\dhtml.css";}s:21:"Frontend/Web/dhtml.js";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"25d19b42fd0dd1434b331b7197039733";s:12:"installed_as";s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\dhtml.js";}s:23:"Frontend/Web/nodhtml.js";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"83392507cc422df1b57ee7c383d3706d";s:12:"installed_as";s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\nodhtml.js";}s:32:"Frontend/Web/bottom.inc.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"13eecadf30a737dc9fa71deb6c9994b5";s:12:"installed_as";s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\bottom.inc.tpl.html";}s:34:"Frontend/Web/channel.info.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"6c0fbe65f855ba51bba40e2d1242c1f4";s:12:"installed_as";s:78:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\channel.info.tpl.html";}s:34:"Frontend/Web/channel.list.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"d5afa67d3361db5ba5fbddc2a7469bed";s:12:"installed_as";s:78:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\channel.list.tpl.html";}s:33:"Frontend/Web/error.popup.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"06563e065a5601403bd3ab0d268e8711";s:12:"installed_as";s:77:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\error.popup.tpl.html";}s:27:"Frontend/Web/error.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"18f41fcd2e3cd6ddb4e1ca1a4592eb6d";s:12:"installed_as";s:71:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\error.tpl.html";}s:32:"Frontend/Web/footer.inc.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"4d214dd44eaca17a5b8c100a0cee7ebc";s:12:"installed_as";s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\footer.inc.tpl.html";}s:32:"Frontend/Web/header.inc.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"700fe24d300daea65e89da7aff494e70";s:12:"installed_as";s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\header.inc.tpl.html";}s:26:"Frontend/Web/info.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"885b1c72febb4ab63fee4614a1b67b2d";s:12:"installed_as";s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\info.tpl.html";}s:34:"Frontend/Web/package.info.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"92e8cc6e41243f5e93ce828bfe28e9a5";s:12:"installed_as";s:78:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\package.info.tpl.html";}s:34:"Frontend/Web/package.list.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"78fecd1689673297260090c2810f7723";s:12:"installed_as";s:78:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\package.list.tpl.html";}s:27:"Frontend/Web/start.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"ad8444920426a7565fc720517882051c";s:12:"installed_as";s:71:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\start.tpl.html";}s:29:"Frontend/Web/top.inc.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"e196e59a33eb6fa48b6b28c3320cba0a";s:12:"installed_as";s:73:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\top.inc.tpl.html";}s:32:"Frontend/Web/userDialog.tpl.html";a:4:{s:4:"role";s:3:"php";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"ae504f0df333244b4085e4eb229e5a11";s:12:"installed_as";s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web\userDialog.tpl.html";}s:16:"docs/example.php";a:5:{s:4:"role";s:3:"doc";s:14:"baseinstalldir";s:4:"PEAR";s:6:"md5sum";s:32:"ae87762a71b6aa0c11c6c398f5235748";s:12:"replacements";a:5:{i:0;a:3:{s:4:"from";s:9:"@php_bin@";s:2:"to";s:7:"php_bin";s:4:"type";s:11:"pear-config";}i:1;a:3:{s:4:"from";s:9:"@bin_dir@";s:2:"to";s:7:"bin_dir";s:4:"type";s:11:"pear-config";}i:2;a:3:{s:4:"from";s:9:"@php_dir@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}i:3;a:3:{s:4:"from";s:14:"@pear_version@";s:2:"to";s:7:"version";s:4:"type";s:12:"package-info";}i:4;a:3:{s:4:"from";s:14:"@include_path@";s:2:"to";s:7:"php_dir";s:4:"type";s:11:"pear-config";}}s:12:"installed_as";s:78:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\PEAR_Frontend_Web\docs\example.php";}}s:10:"xsdversion";s:3:"1.0";s:15:"packagerversion";s:5:"1.4.9";s:7:"package";s:17:"PEAR_Frontend_Web";s:7:"summary";s:25:"HTML (Web) PEAR Installer";s:11:"description";s:38:"Web Interface to the PEAR Installer ";s:11:"maintainers";a:4:{i:0;a:4:{s:6:"handle";s:8:"dickmann";s:4:"name";s:18:"Christian Dickmann";s:5:"email";s:16:"dickmann@php.net";s:4:"role";s:4:"lead";}i:1;a:4:{s:6:"handle";s:6:"pajoye";s:4:"name";s:17:"Pierre-Alain Joye";s:5:"email";s:17:"pajoye@pearfr.org";s:4:"role";s:4:"lead";}i:2;a:4:{s:6:"handle";s:6:"cellog";s:4:"name";s:14:"Gregory Beaver";s:5:"email";s:14:"cellog@php.net";s:4:"role";s:9:"developer";}i:3;a:4:{s:6:"handle";s:3:"ssb";s:4:"name";s:11:"Stig Bakken";s:5:"email";s:12:"stig@php.net";s:4:"role";s:6:"helper";}}s:7:"version";s:5:"0.5.1";s:12:"release_date";s:10:"2006-04-18";s:15:"release_license";s:11:"PHP License";s:13:"release_state";s:5:"alpha";s:13:"release_notes";s:210:"- #6995 missing require_once in Web.php - #6993 prevents large response time, create the cache_dir if it does not exist - #7319, bad display of errors when the install cmd failed - remove Pager dependency ";s:12:"release_deps";a:3:{i:1;a:3:{s:4:"type";s:3:"pkg";s:3:"rel";s:3:"has";s:4:"name";s:20:"Net_UserAgent_Detect";}i:2;a:3:{s:4:"type";s:3:"pkg";s:3:"rel";s:3:"has";s:4:"name";s:16:"HTML_Template_IT";}i:3;a:4:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:5:"1.4.6";s:4:"name";s:4:"PEAR";}}s:9:"changelog";a:3:{i:0;a:3:{s:7:"version";s:5:"0.5.0";s:12:"release_date";s:10:"2005-03-02";s:13:"release_notes";s:117:"Major features addition: channel support Also, support for post-install scripts on install, and package.xml 2.0 ";}i:1;a:3:{s:7:"version";s:3:"0.3";s:12:"release_date";s:10:"2003-05-28";s:13:"release_notes";s:144:"Bugfixes release: - Fix a bug while using both CLI and Web installer (Invalid characters, bug #23516) - Installs correctly the CLI tools ";}i:2;a:3:{s:7:"version";s:3:"0.4";s:12:"release_date";s:10:"2003-06-07";s:13:"release_notes";s:185:"Bugfixes release: - Remove Pager dep - Should work well on non apache system (ie IIS) - The 'installed packages' is now the entry page (no more remote connection during startup) ";}}s:12:"_lastversion";s:5:"0.5.1";s:7:"dirtree";a:8:{s:43:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR";b:1;s:43:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR";b:1;s:52:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend";b:1;s:52:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Frontend";b:1;s:56:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\PEAR\Frontend\Web";b:1;s:56:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\PEAR\Frontend\Web";b:1;s:66:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\PEAR_Frontend_Web\docs";b:1;s:66:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\PEAR_Frontend_Web\docs";b:1;}s:13:"_lastmodified";i:1171608484;}catalog/libs/PEAR/.registry/structures_graph.reg0000644577340101002240000005246010625427742023706 0ustar tonerlogicspg11675700000000000000a:22:{s:7:"attribs";a:6:{s:15:"packagerversion";s:5:"1.5.0";s:7:"version";s:3:"2.0";s:5:"xmlns";s:35:"http://pear.php.net/dtd/package-2.0";s:11:"xmlns:tasks";s:33:"http://pear.php.net/dtd/tasks-1.0";s:9:"xmlns:xsi";s:41:"http://www.w3.org/2001/XMLSchema-instance";s:18:"xsi:schemaLocation";s:159:"http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd";}s:4:"name";s:16:"Structures_Graph";s:7:"channel";s:12:"pear.php.net";s:7:"summary";s:40:"Graph datastructure manipulation library";s:11:"description";s:293:"Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed and undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing as well as for characteristic extraction from the graph topology.";s:4:"lead";a:4:{s:4:"name";s:16:"Sérgio Carvalho";s:4:"user";s:9:"sergiosgc";s:5:"email";s:32:"sergio.carvalho@portugalmail.com";s:6:"active";s:3:"yes";}s:4:"date";s:10:"2007-02-01";s:4:"time";s:8:"17:45:32";s:7:"version";a:2:{s:7:"release";s:5:"1.0.2";s:3:"api";s:5:"1.0.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:47:"http://opensource.org/licenses/lgpl-license.php";}s:8:"_content";s:4:"LGPL";}s:5:"notes";s:130:"- Bug #9682 only variables can be returned by reference - fix Bug #9661 notice in Structures_Graph_Manipulator_Topological::sort()";s:8:"contents";a:1:{s:3:"dir";a:2:{s:7:"attribs";a:2:{s:14:"baseinstalldir";s:0:"";s:4:"name";s:1:"/";}s:4:"file";a:32:{i:0;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"039cb8781dae7b5f5661dc2892fb53b5";s:4:"name";s:26:"docs/html/media/banner.css";s:4:"role";s:3:"doc";}}i:1;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"8ff124484e8a009f94a8d0b4d9b8b1cd";s:4:"name";s:30:"docs/html/media/stylesheet.css";s:4:"role";s:3:"doc";}}i:2;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"a17210dd27171316f5cb446a5bef59ab";s:4:"name";s:48:"docs/html/Structures_Graph/Structures_Graph.html";s:4:"role";s:3:"doc";}}i:3;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"1ed0ac55530b7504c00df35f335e7ef3";s:4:"name";s:72:"docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html";s:4:"role";s:3:"doc";}}i:4;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"fefb65755d57a87d2736e058a1095b03";s:4:"name";s:78:"docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html";s:4:"role";s:3:"doc";}}i:5;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"afb0e3afb91beafd1bc16a07ac31c826";s:4:"name";s:53:"docs/html/Structures_Graph/Structures_Graph_Node.html";s:4:"role";s:3:"doc";}}i:6;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"3fa477998b281061361c4d98fb78c3a8";s:4:"name";s:61:"docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html";s:4:"role";s:3:"doc";}}i:7;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"c46e6566be5249811667ddc7decf405f";s:4:"name";s:77:"docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html";s:4:"role";s:3:"doc";}}i:8;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"c45890d45dd42dc56adb71988c3a45c1";s:4:"name";s:83:"docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html";s:4:"role";s:3:"doc";}}i:9;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"09cb6d17f96553bfb66b99c502676844";s:4:"name";s:58:"docs/html/Structures_Graph/_Structures_Graph_Node_php.html";s:4:"role";s:3:"doc";}}i:10;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"78e1e7ec43a6e754cf4d5dace48fe18c";s:4:"name";s:53:"docs/html/Structures_Graph/_Structures_Graph_php.html";s:4:"role";s:3:"doc";}}i:11;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"d0ada99c3b7e95b23461cc3e713f0c3d";s:4:"name";s:42:"docs/html/classtrees_Structures_Graph.html";s:4:"role";s:3:"doc";}}i:12;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"898dd26ccc1c1572d36e9879afcb5d39";s:4:"name";s:27:"docs/html/elementindex.html";s:4:"role";s:3:"doc";}}i:13;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"19dd287d44163d2abde1a1d8d52521f8";s:4:"name";s:44:"docs/html/elementindex_Structures_Graph.html";s:4:"role";s:3:"doc";}}i:14;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"ae809f6ebbf632351648c340d2d6acd4";s:4:"name";s:21:"docs/html/errors.html";s:4:"role";s:3:"doc";}}i:15;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"db3206e7d176ae78fd04f22acead5ffa";s:4:"name";s:20:"docs/html/index.html";s:4:"role";s:3:"doc";}}i:16;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"4ec087627323546610b64d69a6aafca6";s:4:"name";s:34:"docs/html/li_Structures_Graph.html";s:4:"role";s:3:"doc";}}i:17;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"005081a4c5d60afcbabc1f4909ebfcad";s:4:"name";s:23:"docs/html/packages.html";s:4:"role";s:3:"doc";}}i:18;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"a7a1b748bbda6dfa1632bf6078fc8bb6";s:4:"name";s:23:"docs/html/todolist.html";s:4:"role";s:3:"doc";}}i:19;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"628eb6532a8047bf5962fe24c1c245df";s:4:"name";s:52:"docs/tutorials/Structures_Graph/Structures_Graph.pkg";s:4:"role";s:3:"doc";}}i:20;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"ce2da39dbb75e21074eb5e96231a3379";s:4:"name";s:16:"docs/generate.sh";s:4:"role";s:3:"doc";}}i:21;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"f0aff5a1efd188d63b4b8b9e9e840b97";s:4:"name";s:44:"Structures/Graph/Manipulator/AcyclicTest.php";s:4:"role";s:3:"php";}}i:22;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"0492e677436d29228df93dca23629e06";s:4:"name";s:50:"Structures/Graph/Manipulator/TopologicalSorter.php";s:4:"role";s:3:"php";}}i:23;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"7e28e01ebfa273e5df2eb1ef7a356635";s:4:"name";s:25:"Structures/Graph/Node.php";s:4:"role";s:3:"php";}}i:24;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"4f25a6275af156f6f8e7b4309cb9f40d";s:4:"name";s:20:"Structures/Graph.php";s:4:"role";s:3:"php";}}i:25;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"63dfc6f0f14e18c13d8a8415c3fe049d";s:4:"name";s:29:"tests/testCase/BasicGraph.php";s:4:"role";s:4:"test";}}i:26;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"1b9e35896d229b84601e6754cd44e339";s:4:"name";s:19:"tests/all-tests.php";s:4:"role";s:4:"test";}}i:27;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"d41d8cd98f00b204e9800998ecf8427e";s:4:"name";s:12:"tests/README";s:4:"role";s:4:"test";}}i:28;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"ab23406ec7bfbb2029ca536378ff57db";s:4:"name";s:17:"genpackage.xml.pl";s:4:"role";s:4:"data";}}i:29;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"7fbc338309ac38fefcd64b04bb903e34";s:4:"name";s:7:"LICENSE";s:4:"role";s:4:"data";}}i:30;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"6e782f281c7d0ce27e54b574247073cb";s:4:"name";s:10:"package.sh";s:4:"role";s:4:"data";}}i:31;a:1:{s:7:"attribs";a:4:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"b81f67f7b5600231735243be73625e54";s:4:"name";s:10:"publish.sh";s:4:"role";s:4:"data";}}}}}s:12:"dependencies";a:1:{s:8:"required";a:2:{s:3:"php";a:1:{s:3:"min";s:5:"4.2.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:5:"1.4.3";}}}s:10:"phprelease";s:0:"";s:9:"changelog";a:1:{s:7:"release";a:5:{s:7:"version";a:2:{s:7:"release";s:5:"1.0.2";s:3:"api";s:5:"1.0.0";}s:9:"stability";a:2:{s:7:"release";s:6:"stable";s:3:"api";s:6:"stable";}s:4:"date";s:10:"2007-01-07";s:7:"license";a:2:{s:7:"attribs";a:1:{s:3:"uri";s:47:"http://opensource.org/licenses/lgpl-license.php";}s:8:"_content";s:4:"LGPL";}s:5:"notes";s:130:"- Bug #9682 only variables can be returned by reference - fix Bug #9661 notice in Structures_Graph_Manipulator_Topological::sort()";}}s:8:"filelist";a:32:{s:26:"docs/html/media/banner.css";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"039cb8781dae7b5f5661dc2892fb53b5";s:4:"name";s:26:"docs/html/media/banner.css";s:4:"role";s:3:"doc";s:12:"installed_as";s:87:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\media\banner.css";}s:30:"docs/html/media/stylesheet.css";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"8ff124484e8a009f94a8d0b4d9b8b1cd";s:4:"name";s:30:"docs/html/media/stylesheet.css";s:4:"role";s:3:"doc";s:12:"installed_as";s:91:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\media\stylesheet.css";}s:48:"docs/html/Structures_Graph/Structures_Graph.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"a17210dd27171316f5cb446a5bef59ab";s:4:"name";s:48:"docs/html/Structures_Graph/Structures_Graph.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:109:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\Structures_Graph.html";}s:72:"docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"1ed0ac55530b7504c00df35f335e7ef3";s:4:"name";s:72:"docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:133:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\Structures_Graph_Manipulator_AcyclicTest.html";}s:78:"docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"fefb65755d57a87d2736e058a1095b03";s:4:"name";s:78:"docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:139:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\Structures_Graph_Manipulator_TopologicalSorter.html";}s:53:"docs/html/Structures_Graph/Structures_Graph_Node.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"afb0e3afb91beafd1bc16a07ac31c826";s:4:"name";s:53:"docs/html/Structures_Graph/Structures_Graph_Node.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:114:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\Structures_Graph_Node.html";}s:61:"docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"3fa477998b281061361c4d98fb78c3a8";s:4:"name";s:61:"docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:122:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\tutorial_Structures_Graph.pkg.html";}s:77:"docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"c46e6566be5249811667ddc7decf405f";s:4:"name";s:77:"docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:138:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\_Structures_Graph_Manipulator_AcyclicTest_php.html";}s:83:"docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"c45890d45dd42dc56adb71988c3a45c1";s:4:"name";s:83:"docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:144:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\_Structures_Graph_Manipulator_TopologicalSorter_php.html";}s:58:"docs/html/Structures_Graph/_Structures_Graph_Node_php.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"09cb6d17f96553bfb66b99c502676844";s:4:"name";s:58:"docs/html/Structures_Graph/_Structures_Graph_Node_php.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:119:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\_Structures_Graph_Node_php.html";}s:53:"docs/html/Structures_Graph/_Structures_Graph_php.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"78e1e7ec43a6e754cf4d5dace48fe18c";s:4:"name";s:53:"docs/html/Structures_Graph/_Structures_Graph_php.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:114:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph\_Structures_Graph_php.html";}s:42:"docs/html/classtrees_Structures_Graph.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"d0ada99c3b7e95b23461cc3e713f0c3d";s:4:"name";s:42:"docs/html/classtrees_Structures_Graph.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:103:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\classtrees_Structures_Graph.html";}s:27:"docs/html/elementindex.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"898dd26ccc1c1572d36e9879afcb5d39";s:4:"name";s:27:"docs/html/elementindex.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:88:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\elementindex.html";}s:44:"docs/html/elementindex_Structures_Graph.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"19dd287d44163d2abde1a1d8d52521f8";s:4:"name";s:44:"docs/html/elementindex_Structures_Graph.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:105:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\elementindex_Structures_Graph.html";}s:21:"docs/html/errors.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"ae809f6ebbf632351648c340d2d6acd4";s:4:"name";s:21:"docs/html/errors.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:82:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\errors.html";}s:20:"docs/html/index.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"db3206e7d176ae78fd04f22acead5ffa";s:4:"name";s:20:"docs/html/index.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:81:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\index.html";}s:34:"docs/html/li_Structures_Graph.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"4ec087627323546610b64d69a6aafca6";s:4:"name";s:34:"docs/html/li_Structures_Graph.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:95:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\li_Structures_Graph.html";}s:23:"docs/html/packages.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"005081a4c5d60afcbabc1f4909ebfcad";s:4:"name";s:23:"docs/html/packages.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:84:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\packages.html";}s:23:"docs/html/todolist.html";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"a7a1b748bbda6dfa1632bf6078fc8bb6";s:4:"name";s:23:"docs/html/todolist.html";s:4:"role";s:3:"doc";s:12:"installed_as";s:84:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\todolist.html";}s:52:"docs/tutorials/Structures_Graph/Structures_Graph.pkg";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"628eb6532a8047bf5962fe24c1c245df";s:4:"name";s:52:"docs/tutorials/Structures_Graph/Structures_Graph.pkg";s:4:"role";s:3:"doc";s:12:"installed_as";s:113:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\tutorials\Structures_Graph\Structures_Graph.pkg";}s:16:"docs/generate.sh";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"ce2da39dbb75e21074eb5e96231a3379";s:4:"name";s:16:"docs/generate.sh";s:4:"role";s:3:"doc";s:12:"installed_as";s:77:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\generate.sh";}s:44:"Structures/Graph/Manipulator/AcyclicTest.php";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"f0aff5a1efd188d63b4b8b9e9e840b97";s:4:"name";s:44:"Structures/Graph/Manipulator/AcyclicTest.php";s:4:"role";s:3:"php";s:12:"installed_as";s:83:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Structures\Graph\Manipulator\AcyclicTest.php";}s:50:"Structures/Graph/Manipulator/TopologicalSorter.php";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"0492e677436d29228df93dca23629e06";s:4:"name";s:50:"Structures/Graph/Manipulator/TopologicalSorter.php";s:4:"role";s:3:"php";s:12:"installed_as";s:89:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Structures\Graph\Manipulator\TopologicalSorter.php";}s:25:"Structures/Graph/Node.php";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"7e28e01ebfa273e5df2eb1ef7a356635";s:4:"name";s:25:"Structures/Graph/Node.php";s:4:"role";s:3:"php";s:12:"installed_as";s:64:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Structures\Graph\Node.php";}s:20:"Structures/Graph.php";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"4f25a6275af156f6f8e7b4309cb9f40d";s:4:"name";s:20:"Structures/Graph.php";s:4:"role";s:3:"php";s:12:"installed_as";s:59:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Structures\Graph.php";}s:29:"tests/testCase/BasicGraph.php";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"63dfc6f0f14e18c13d8a8415c3fe049d";s:4:"name";s:29:"tests/testCase/BasicGraph.php";s:4:"role";s:4:"test";s:12:"installed_as";s:91:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\Structures_Graph\tests\testCase\BasicGraph.php";}s:19:"tests/all-tests.php";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"1b9e35896d229b84601e6754cd44e339";s:4:"name";s:19:"tests/all-tests.php";s:4:"role";s:4:"test";s:12:"installed_as";s:81:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\Structures_Graph\tests\all-tests.php";}s:12:"tests/README";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"d41d8cd98f00b204e9800998ecf8427e";s:4:"name";s:12:"tests/README";s:4:"role";s:4:"test";s:12:"installed_as";s:74:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\Structures_Graph\tests\README";}s:17:"genpackage.xml.pl";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"ab23406ec7bfbb2029ca536378ff57db";s:4:"name";s:17:"genpackage.xml.pl";s:4:"role";s:4:"data";s:12:"installed_as";s:78:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\Structures_Graph\genpackage.xml.pl";}s:7:"LICENSE";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"7fbc338309ac38fefcd64b04bb903e34";s:4:"name";s:7:"LICENSE";s:4:"role";s:4:"data";s:12:"installed_as";s:68:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\Structures_Graph\LICENSE";}s:10:"package.sh";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"6e782f281c7d0ce27e54b574247073cb";s:4:"name";s:10:"package.sh";s:4:"role";s:4:"data";s:12:"installed_as";s:71:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\Structures_Graph\package.sh";}s:10:"publish.sh";a:5:{s:14:"baseinstalldir";s:0:"";s:6:"md5sum";s:32:"b81f67f7b5600231735243be73625e54";s:4:"name";s:10:"publish.sh";s:4:"role";s:4:"data";s:12:"installed_as";s:71:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\Structures_Graph\publish.sh";}}s:12:"_lastversion";s:5:"1.0.2";s:7:"dirtree";a:22:{s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\media";b:1;s:76:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\Structures_Graph\docs\html\media";b:1;s:70:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\Structures_Graph\docs\html";b:1;s:65:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\Structures_Graph\docs";b:1;s:87:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html\Structures_Graph";b:1;s:87:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\Structures_Graph\docs\html\Structures_Graph";b:1;s:70:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\html";b:1;s:92:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs\tutorials\Structures_Graph";b:1;s:92:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\Structures_Graph\docs\tutorials\Structures_Graph";b:1;s:75:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\docs\Structures_Graph\docs\tutorials";b:1;s:65:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\docs\Structures_Graph\docs";b:1;s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Structures\Graph\Manipulator";b:1;s:67:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\Structures\Graph\Manipulator";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\Structures\Graph";b:1;s:49:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\Structures";b:1;s:55:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Structures\Graph";b:1;s:49:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\Structures";b:1;s:76:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\Structures_Graph\tests\testCase";b:1;s:76:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\tests\Structures_Graph\tests\testCase";b:1;s:67:"D:\Apache2\htdocs\tshirtshop\libs/PEAR\tests\Structures_Graph\tests";b:1;s:67:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\tests\Structures_Graph\tests";b:1;s:60:"D:\Apache2\htdocs\tshirtshop\libs\PEAR\data\Structures_Graph";b:1;}s:3:"old";a:7:{s:7:"version";s:5:"1.0.2";s:12:"release_date";s:10:"2007-02-01";s:13:"release_state";s:6:"stable";s:15:"release_license";s:4:"LGPL";s:13:"release_notes";s:130:"- Bug #9682 only variables can be returned by reference - fix Bug #9661 notice in Structures_Graph_Manipulator_Topological::sort()";s:12:"release_deps";a:2:{i:0;a:4:{s:4:"type";s:3:"php";s:3:"rel";s:2:"ge";s:7:"version";s:5:"4.2.0";s:8:"optional";s:2:"no";}i:1;a:6:{s:4:"type";s:3:"pkg";s:7:"channel";s:12:"pear.php.net";s:4:"name";s:4:"PEAR";s:3:"rel";s:2:"ge";s:7:"version";s:5:"1.4.3";s:8:"optional";s:2:"no";}}s:11:"maintainers";a:1:{i:0;a:5:{s:4:"name";s:16:"Sérgio Carvalho";s:5:"email";s:32:"sergio.carvalho@portugalmail.com";s:6:"active";s:3:"yes";s:6:"handle";s:9:"sergiosgc";s:4:"role";s:4:"lead";}}}s:10:"xsdversion";s:3:"2.0";s:13:"_lastmodified";i:1171608477;}catalog/libs/PEAR/cache/0000755577340101002240000000000010625423063016701 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.channels/0000755577340101002240000000000010625427723017516 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.channels/.alias/0000755577340101002240000000000010625427721020663 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.channels/.alias/pear.txt0000644577340101002240000000001410625427721022346 0ustar tonerlogicspg11675700000000000000pear.php.netcatalog/libs/PEAR/.channels/.alias/pecl.txt0000644577340101002240000000001410625427722022343 0ustar tonerlogicspg11675700000000000000pecl.php.netcatalog/libs/PEAR/.channels/pear.php.net.reg0000644577340101002240000000267610625427723022532 0ustar tonerlogicspg11675700000000000000a:5:{s:4:"name";s:12:"pear.php.net";s:14:"suggestedalias";s:4:"pear";s:7:"summary";s:40:"PHP Extension and Application Repository";s:7:"servers";a:1:{s:7:"primary";a:2:{s:6:"xmlrpc";a:1:{s:8:"function";a:10:{i:0;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:9:"logintest";}i:1;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:26:"package.listLatestReleases";}i:2;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"package.listAll";}i:3;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:12:"package.info";}i:4;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:22:"package.getDownloadURL";}i:5;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:22:"package.getDownloadURL";}i:6;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:7;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:8;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:14:"package.search";}i:9;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"channel.listAll";}}}s:4:"rest";a:1:{s:7:"baseurl";a:2:{i:0;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.0";}s:8:"_content";s:25:"http://pear.php.net/rest/";}i:1;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.1";}s:8:"_content";s:25:"http://pear.php.net/rest/";}}}}}s:13:"_lastmodified";s:31:"Fri, 16 Feb 2007 12:56:20 +1100";}catalog/libs/PEAR/.channels/pecl.php.net.reg0000644577340101002240000000305010625427723022511 0ustar tonerlogicspg11675700000000000000a:6:{s:4:"name";s:12:"pecl.php.net";s:14:"suggestedalias";s:4:"pecl";s:7:"summary";s:31:"PHP Extension Community Library";s:7:"servers";a:1:{s:7:"primary";a:2:{s:6:"xmlrpc";a:1:{s:8:"function";a:10:{i:0;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:9:"logintest";}i:1;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:26:"package.listLatestReleases";}i:2;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"package.listAll";}i:3;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:12:"package.info";}i:4;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:22:"package.getDownloadURL";}i:5;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:22:"package.getDownloadURL";}i:6;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:7;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.1";}s:8:"_content";s:25:"package.getDepDownloadURL";}i:8;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:14:"package.search";}i:9;a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:15:"channel.listAll";}}}s:4:"rest";a:1:{s:7:"baseurl";a:2:{i:0;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.0";}s:8:"_content";s:25:"http://pecl.php.net/rest/";}i:1;a:2:{s:7:"attribs";a:1:{s:4:"type";s:7:"REST1.1";}s:8:"_content";s:25:"http://pecl.php.net/rest/";}}}}}s:15:"validatepackage";a:2:{s:8:"_content";s:19:"PEAR_Validator_PECL";s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}}s:13:"_lastmodified";s:31:"Fri, 16 Feb 2007 12:56:20 +1100";}catalog/libs/PEAR/.channels/__uri.reg0000644577340101002240000000044710625427724021320 0ustar tonerlogicspg11675700000000000000a:4:{s:4:"name";s:5:"__uri";s:7:"servers";a:1:{s:7:"primary";a:1:{s:6:"xmlrpc";a:1:{s:8:"function";a:2:{s:7:"attribs";a:1:{s:7:"version";s:3:"1.0";}s:8:"_content";s:4:"****";}}}}s:7:"summary";s:34:"Pseudo-channel for static packages";s:13:"_lastmodified";s:31:"Fri, 16 Feb 2007 12:56:20 +1100";}catalog/libs/PEAR/.depdb0000644577340101002240000000551710625427724016735 0ustar tonerlogicspg11675700000000000000a:3:{s:8:"_version";s:3:"1.0";s:12:"dependencies";a:1:{s:12:"pear.php.net";a:3:{s:4:"pear";a:7:{i:0;a:3:{s:3:"dep";a:3:{s:4:"name";s:4:"PEAR";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.3.3";}s:4:"type";s:8:"required";s:5:"group";b:0;}i:1;a:3:{s:3:"dep";a:3:{s:4:"name";s:11:"Archive_Tar";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.3.1";}s:4:"type";s:8:"required";s:5:"group";b:0;}i:2;a:3:{s:3:"dep";a:3:{s:4:"name";s:14:"Console_Getopt";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:3:"1.2";}s:4:"type";s:8:"required";s:5:"group";b:0;}i:3;a:3:{s:3:"dep";a:3:{s:4:"name";s:16:"Structures_Graph";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.0.2";}s:4:"type";s:8:"required";s:5:"group";b:0;}i:4;a:3:{s:3:"dep";a:3:{s:4:"name";s:7:"XML_RPC";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.4.0";}s:4:"type";s:8:"optional";s:5:"group";b:0;}i:5;a:3:{s:3:"dep";a:3:{s:4:"name";s:17:"PEAR_Frontend_Web";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"0.5.0";}s:4:"type";s:8:"optional";s:5:"group";b:0;}i:6;a:3:{s:3:"dep";a:3:{s:4:"name";s:17:"PEAR_Frontend_Gtk";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"0.4.0";}s:4:"type";s:8:"optional";s:5:"group";b:0;}}s:17:"pear_frontend_web";a:3:{i:0;a:3:{s:3:"dep";a:2:{s:4:"name";s:20:"Net_UserAgent_Detect";s:7:"channel";s:12:"pear.php.net";}s:4:"type";s:8:"required";s:5:"group";b:0;}i:1;a:3:{s:3:"dep";a:2:{s:4:"name";s:16:"HTML_Template_IT";s:7:"channel";s:12:"pear.php.net";}s:4:"type";s:8:"required";s:5:"group";b:0;}i:2;a:3:{s:3:"dep";a:3:{s:4:"name";s:4:"PEAR";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.4.6";}s:4:"type";s:8:"required";s:5:"group";b:0;}}s:4:"mdb2";a:1:{i:0;a:3:{s:3:"dep";a:3:{s:4:"name";s:4:"PEAR";s:7:"channel";s:12:"pear.php.net";s:3:"min";s:5:"1.3.6";}s:4:"type";s:8:"required";s:5:"group";b:0;}}}}s:8:"packages";a:1:{s:12:"pear.php.net";a:9:{s:4:"pear";a:3:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"pear";}i:1;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:17:"pear_frontend_web";}i:2;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"mdb2";}}s:11:"archive_tar";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"pear";}}s:14:"console_getopt";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"pear";}}s:16:"structures_graph";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"pear";}}s:7:"xml_rpc";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"pear";}}s:17:"pear_frontend_web";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"pear";}}s:17:"pear_frontend_gtk";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:4:"pear";}}s:20:"net_useragent_detect";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:17:"pear_frontend_web";}}s:16:"html_template_it";a:1:{i:0;a:2:{s:7:"channel";s:12:"pear.php.net";s:7:"package";s:17:"pear_frontend_web";}}}}}catalog/libs/PEAR/.depdblock0000644577340101002240000000000010625427724017564 0ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/.filemap0000644577340101002240000003143110625427726017270 0ustar tonerlogicspg11675700000000000000a:5:{s:3:"php";a:146:{s:16:"\Archive/Tar.php";s:11:"archive_tar";s:18:"Console/Getopt.php";s:14:"console_getopt";s:20:"HTML/Template\IT.php";s:16:"html_template_it";s:21:"HTML/Template\ITX.php";s:16:"html_template_it";s:26:"HTML/Template\IT_Error.php";s:16:"html_template_it";s:32:"\MDB2/Driver/Datatype/Common.php";s:4:"mdb2";s:32:"\MDB2/Driver/Function/Common.php";s:4:"mdb2";s:31:"\MDB2/Driver/Manager/Common.php";s:4:"mdb2";s:30:"\MDB2/Driver/Native/Common.php";s:4:"mdb2";s:31:"\MDB2/Driver/Reverse/Common.php";s:4:"mdb2";s:14:"\MDB2/Date.php";s:4:"mdb2";s:18:"\MDB2/Extended.php";s:4:"mdb2";s:18:"\MDB2/Iterator.php";s:4:"mdb2";s:13:"\MDB2/LOB.php";s:4:"mdb2";s:9:"\MDB2.php";s:4:"mdb2";s:24:"Net/UserAgent\Detect.php";s:20:"net_useragent_detect";s:12:"OS/Guess.php";s:4:"pear";s:27:"PEAR/ChannelFile/Parser.php";s:4:"pear";s:21:"PEAR/Command/Auth.xml";s:4:"pear";s:21:"PEAR/Command/Auth.php";s:4:"pear";s:22:"PEAR/Command/Build.xml";s:4:"pear";s:22:"PEAR/Command/Build.php";s:4:"pear";s:25:"PEAR/Command/Channels.xml";s:4:"pear";s:25:"PEAR/Command/Channels.php";s:4:"pear";s:23:"PEAR/Command/Common.php";s:4:"pear";s:23:"PEAR/Command/Config.xml";s:4:"pear";s:23:"PEAR/Command/Config.php";s:4:"pear";s:24:"PEAR/Command/Install.xml";s:4:"pear";s:24:"PEAR/Command/Install.php";s:4:"pear";s:24:"PEAR/Command/Package.xml";s:4:"pear";s:24:"PEAR/Command/Package.php";s:4:"pear";s:23:"PEAR/Command/Pickle.xml";s:4:"pear";s:23:"PEAR/Command/Pickle.php";s:4:"pear";s:25:"PEAR/Command/Registry.xml";s:4:"pear";s:25:"PEAR/Command/Registry.php";s:4:"pear";s:23:"PEAR/Command/Remote.xml";s:4:"pear";s:23:"PEAR/Command/Remote.php";s:4:"pear";s:23:"PEAR/Command/Mirror.xml";s:4:"pear";s:23:"PEAR/Command/Mirror.php";s:4:"pear";s:21:"PEAR/Command/Test.xml";s:4:"pear";s:21:"PEAR/Command/Test.php";s:4:"pear";s:27:"PEAR/Downloader/Package.php";s:4:"pear";s:21:"PEAR/Frontend/CLI.php";s:4:"pear";s:30:"PEAR/Installer/Role/Common.php";s:4:"pear";s:28:"PEAR/Installer/Role/Data.xml";s:4:"pear";s:28:"PEAR/Installer/Role/Data.php";s:4:"pear";s:27:"PEAR/Installer/Role/Doc.xml";s:4:"pear";s:27:"PEAR/Installer/Role/Doc.php";s:4:"pear";s:27:"PEAR/Installer/Role/Ext.xml";s:4:"pear";s:27:"PEAR/Installer/Role/Ext.php";s:4:"pear";s:27:"PEAR/Installer/Role/Php.xml";s:4:"pear";s:27:"PEAR/Installer/Role/Php.php";s:4:"pear";s:30:"PEAR/Installer/Role/Script.xml";s:4:"pear";s:30:"PEAR/Installer/Role/Script.php";s:4:"pear";s:27:"PEAR/Installer/Role/Src.xml";s:4:"pear";s:27:"PEAR/Installer/Role/Src.php";s:4:"pear";s:28:"PEAR/Installer/Role/Test.xml";s:4:"pear";s:28:"PEAR/Installer/Role/Test.php";s:4:"pear";s:23:"PEAR/Installer/Role.php";s:4:"pear";s:33:"PEAR/PackageFile/Generator/v1.php";s:4:"pear";s:33:"PEAR/PackageFile/Generator/v2.php";s:4:"pear";s:30:"PEAR/PackageFile/Parser/v1.php";s:4:"pear";s:30:"PEAR/PackageFile/Parser/v2.php";s:4:"pear";s:26:"PEAR/PackageFile/v2/rw.php";s:4:"pear";s:33:"PEAR/PackageFile/v2/Validator.php";s:4:"pear";s:23:"PEAR/PackageFile/v1.php";s:4:"pear";s:23:"PEAR/PackageFile/v2.php";s:4:"pear";s:16:"PEAR/REST/10.php";s:4:"pear";s:16:"PEAR/REST/11.php";s:4:"pear";s:34:"PEAR/Task/Postinstallscript/rw.php";s:4:"pear";s:24:"PEAR/Task/Replace/rw.php";s:4:"pear";s:24:"PEAR/Task/Unixeol/rw.php";s:4:"pear";s:27:"PEAR/Task/Windowseol/rw.php";s:4:"pear";s:20:"PEAR/Task/Common.php";s:4:"pear";s:31:"PEAR/Task/Postinstallscript.php";s:4:"pear";s:21:"PEAR/Task/Replace.php";s:4:"pear";s:21:"PEAR/Task/Unixeol.php";s:4:"pear";s:24:"PEAR/Task/Windowseol.php";s:4:"pear";s:23:"PEAR/Validator/PECL.php";s:4:"pear";s:19:"PEAR/Autoloader.php";s:4:"pear";s:16:"PEAR/Builder.php";s:4:"pear";s:20:"PEAR/ChannelFile.php";s:4:"pear";s:16:"PEAR/Command.php";s:4:"pear";s:15:"PEAR/Common.php";s:4:"pear";s:15:"PEAR/Config.php";s:4:"pear";s:19:"PEAR/Dependency.php";s:4:"pear";s:21:"PEAR/DependencyDB.php";s:4:"pear";s:20:"PEAR/Dependency2.php";s:4:"pear";s:19:"PEAR/Downloader.php";s:4:"pear";s:19:"PEAR/ErrorStack.php";s:4:"pear";s:18:"PEAR/Exception.php";s:4:"pear";s:17:"PEAR/Frontend.php";s:4:"pear";s:18:"PEAR/Installer.php";s:4:"pear";s:17:"PEAR/Packager.php";s:4:"pear";s:20:"PEAR/PackageFile.php";s:4:"pear";s:17:"PEAR/Registry.php";s:4:"pear";s:15:"PEAR/Remote.php";s:4:"pear";s:13:"PEAR/REST.php";s:4:"pear";s:16:"PEAR/RunTest.php";s:4:"pear";s:17:"PEAR/Validate.php";s:4:"pear";s:18:"PEAR/XMLParser.php";s:4:"pear";s:20:"\scripts/pearcmd.php";s:4:"pear";s:20:"\scripts/peclcmd.php";s:4:"pear";s:9:"\PEAR.php";s:4:"pear";s:11:"\System.php";s:4:"pear";s:21:"PEAR\WebInstaller.php";s:17:"pear_frontend_web";s:21:"PEAR\Frontend/Web.php";s:17:"pear_frontend_web";s:28:"PEAR\Frontend/Web/config.gif";s:17:"pear_frontend_web";s:30:"PEAR\Frontend/Web/download.gif";s:17:"pear_frontend_web";s:27:"PEAR\Frontend/Web/error.gif";s:17:"pear_frontend_web";s:26:"PEAR\Frontend/Web/info.gif";s:17:"pear_frontend_web";s:30:"PEAR\Frontend/Web/infoplus.gif";s:17:"pear_frontend_web";s:29:"PEAR\Frontend/Web/install.gif";s:17:"pear_frontend_web";s:34:"PEAR\Frontend/Web/install_fail.gif";s:17:"pear_frontend_web";s:32:"PEAR\Frontend/Web/install_ok.gif";s:17:"pear_frontend_web";s:34:"PEAR\Frontend/Web/install_wait.gif";s:17:"pear_frontend_web";s:27:"PEAR\Frontend/Web/login.gif";s:17:"pear_frontend_web";s:28:"PEAR\Frontend/Web/logout.gif";s:17:"pear_frontend_web";s:28:"PEAR\Frontend/Web/manual.gif";s:17:"pear_frontend_web";s:31:"PEAR\Frontend/Web/pearsmall.gif";s:17:"pear_frontend_web";s:27:"PEAR\Frontend/Web/trash.gif";s:17:"pear_frontend_web";s:29:"PEAR\Frontend/Web/package.jpg";s:17:"pear_frontend_web";s:30:"PEAR\Frontend/Web/category.jpg";s:17:"pear_frontend_web";s:29:"PEAR\Frontend/Web/pkglist.png";s:17:"pear_frontend_web";s:31:"PEAR\Frontend/Web/pkgsearch.png";s:17:"pear_frontend_web";s:27:"PEAR\Frontend/Web/style.css";s:17:"pear_frontend_web";s:27:"PEAR\Frontend/Web/dhtml.css";s:17:"pear_frontend_web";s:26:"PEAR\Frontend/Web/dhtml.js";s:17:"pear_frontend_web";s:28:"PEAR\Frontend/Web/nodhtml.js";s:17:"pear_frontend_web";s:37:"PEAR\Frontend/Web/bottom.inc.tpl.html";s:17:"pear_frontend_web";s:39:"PEAR\Frontend/Web/channel.info.tpl.html";s:17:"pear_frontend_web";s:39:"PEAR\Frontend/Web/channel.list.tpl.html";s:17:"pear_frontend_web";s:38:"PEAR\Frontend/Web/error.popup.tpl.html";s:17:"pear_frontend_web";s:32:"PEAR\Frontend/Web/error.tpl.html";s:17:"pear_frontend_web";s:37:"PEAR\Frontend/Web/footer.inc.tpl.html";s:17:"pear_frontend_web";s:37:"PEAR\Frontend/Web/header.inc.tpl.html";s:17:"pear_frontend_web";s:31:"PEAR\Frontend/Web/info.tpl.html";s:17:"pear_frontend_web";s:39:"PEAR\Frontend/Web/package.info.tpl.html";s:17:"pear_frontend_web";s:39:"PEAR\Frontend/Web/package.list.tpl.html";s:17:"pear_frontend_web";s:32:"PEAR\Frontend/Web/start.tpl.html";s:17:"pear_frontend_web";s:34:"PEAR\Frontend/Web/top.inc.tpl.html";s:17:"pear_frontend_web";s:37:"PEAR\Frontend/Web/userDialog.tpl.html";s:17:"pear_frontend_web";s:45:"\Structures/Graph/Manipulator/AcyclicTest.php";s:16:"structures_graph";s:51:"\Structures/Graph/Manipulator/TopologicalSorter.php";s:16:"structures_graph";s:26:"\Structures/Graph/Node.php";s:16:"structures_graph";s:21:"\Structures/Graph.php";s:16:"structures_graph";}s:3:"doc";a:40:{s:32:"archive_tar\docs/Archive_Tar.txt";s:11:"archive_tar";s:24:"html_template_it\LICENSE";s:16:"html_template_it";s:39:"html_template_it\examples/sample_it.php";s:16:"html_template_it";s:53:"html_template_it\examples/sample_itx_addblockfile.php";s:16:"html_template_it";s:48:"html_template_it\examples/templates/main.tpl.htm";s:16:"html_template_it";s:61:"html_template_it\examples/templates/addblockfile_list.tpl.htm";s:16:"html_template_it";s:61:"html_template_it\examples/templates/addblockfile_main.tpl.htm";s:16:"html_template_it";s:30:"mdb2\docs/examples/example.php";s:4:"mdb2";s:35:"mdb2\docs/examples/example_php5.php";s:4:"mdb2";s:42:"mdb2\docs/examples/metapear_test_db.schema";s:4:"mdb2";s:22:"mdb2\docs/CONTRIBUTORS";s:4:"mdb2";s:24:"mdb2\docs/datatypes.html";s:4:"mdb2";s:21:"mdb2\docs/MAINTAINERS";s:4:"mdb2";s:16:"mdb2\docs/README";s:4:"mdb2";s:16:"mdb2\docs/STATUS";s:4:"mdb2";s:14:"mdb2\docs/TODO";s:4:"mdb2";s:12:"pear\INSTALL";s:4:"pear";s:11:"pear\README";s:4:"pear";s:34:"pear_frontend_web\docs/example.php";s:17:"pear_frontend_web";s:43:"structures_graph\docs/html/media/banner.css";s:16:"structures_graph";s:47:"structures_graph\docs/html/media/stylesheet.css";s:16:"structures_graph";s:65:"structures_graph\docs/html/Structures_Graph/Structures_Graph.html";s:16:"structures_graph";s:89:"structures_graph\docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html";s:16:"structures_graph";s:95:"structures_graph\docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html";s:16:"structures_graph";s:70:"structures_graph\docs/html/Structures_Graph/Structures_Graph_Node.html";s:16:"structures_graph";s:78:"structures_graph\docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html";s:16:"structures_graph";s:94:"structures_graph\docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html";s:16:"structures_graph";s:100:"structures_graph\docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html";s:16:"structures_graph";s:75:"structures_graph\docs/html/Structures_Graph/_Structures_Graph_Node_php.html";s:16:"structures_graph";s:70:"structures_graph\docs/html/Structures_Graph/_Structures_Graph_php.html";s:16:"structures_graph";s:59:"structures_graph\docs/html/classtrees_Structures_Graph.html";s:16:"structures_graph";s:44:"structures_graph\docs/html/elementindex.html";s:16:"structures_graph";s:61:"structures_graph\docs/html/elementindex_Structures_Graph.html";s:16:"structures_graph";s:38:"structures_graph\docs/html/errors.html";s:16:"structures_graph";s:37:"structures_graph\docs/html/index.html";s:16:"structures_graph";s:51:"structures_graph\docs/html/li_Structures_Graph.html";s:16:"structures_graph";s:40:"structures_graph\docs/html/packages.html";s:16:"structures_graph";s:40:"structures_graph\docs/html/todolist.html";s:16:"structures_graph";s:69:"structures_graph\docs/tutorials/Structures_Graph/Structures_Graph.pkg";s:16:"structures_graph";s:33:"structures_graph\docs/generate.sh";s:16:"structures_graph";}s:4:"test";a:40:{s:46:"html_template_it\tests/templates/addblock.html";s:16:"html_template_it";s:52:"html_template_it\tests/templates/blockiteration.html";s:16:"html_template_it";s:44:"html_template_it\tests/templates/blocks.html";s:16:"html_template_it";s:45:"html_template_it\tests/templates/globals.html";s:16:"html_template_it";s:47:"html_template_it\tests/templates/__include.html";s:16:"html_template_it";s:45:"html_template_it\tests/templates/include.html";s:16:"html_template_it";s:54:"html_template_it\tests/templates/loadtemplatefile.html";s:16:"html_template_it";s:50:"html_template_it\tests/templates/replaceblock.html";s:16:"html_template_it";s:47:"html_template_it\tests/Console_TestListener.php";s:16:"html_template_it";s:42:"html_template_it\tests/IT_api_testcase.php";s:16:"html_template_it";s:44:"html_template_it\tests/IT_usage_testcase.php";s:16:"html_template_it";s:43:"html_template_it\tests/ITX_api_testcase.php";s:16:"html_template_it";s:45:"html_template_it\tests/ITX_usage_testcase.php";s:16:"html_template_it";s:31:"html_template_it\tests/test.php";s:16:"html_template_it";s:21:"mdb2\tests/basic.phpt";s:4:"mdb2";s:22:"mdb2\tests/clitest.php";s:4:"mdb2";s:21:"mdb2\tests/config.php";s:4:"mdb2";s:35:"mdb2\tests/Console_TestListener.php";s:4:"mdb2";s:32:"mdb2\tests/HTML_TestListener.php";s:4:"mdb2";s:32:"mdb2\tests/MDB2_api_testcase.php";s:4:"mdb2";s:33:"mdb2\tests/MDB2_bugs_testcase.php";s:4:"mdb2";s:32:"mdb2\tests/MDB2_Connect_Test.php";s:4:"mdb2";s:37:"mdb2\tests/MDB2_datatype_testcase.php";s:4:"mdb2";s:37:"mdb2\tests/MDB2_extended_testcase.php";s:4:"mdb2";s:37:"mdb2\tests/MDB2_function_testcase.php";s:4:"mdb2";s:36:"mdb2\tests/MDB2_manager_testcase.php";s:4:"mdb2";s:35:"mdb2\tests/MDB2_native_testcase.php";s:4:"mdb2";s:36:"mdb2\tests/MDB2_reverse_testcase.php";s:4:"mdb2";s:28:"mdb2\tests/MDB2_testcase.php";s:4:"mdb2";s:34:"mdb2\tests/MDB2_usage_testcase.php";s:4:"mdb2";s:17:"mdb2\tests/README";s:4:"mdb2";s:19:"mdb2\tests/test.php";s:4:"mdb2";s:25:"mdb2\tests/testchoose.php";s:4:"mdb2";s:20:"mdb2\tests/tests.css";s:4:"mdb2";s:24:"mdb2\tests/testUtils.php";s:4:"mdb2";s:30:"mdb2\tests/test_setup.php.dist";s:4:"mdb2";s:38:"net_useragent_detect\tests/example.php";s:20:"net_useragent_detect";s:46:"structures_graph\tests/testCase/BasicGraph.php";s:16:"structures_graph";s:36:"structures_graph\tests/all-tests.php";s:16:"structures_graph";s:29:"structures_graph\tests/README";s:16:"structures_graph";}s:4:"data";a:7:{s:12:"mdb2\LICENSE";s:4:"mdb2";s:16:"pear\package.dtd";s:4:"pear";s:18:"pear\template.spec";s:4:"pear";s:34:"structures_graph\genpackage.xml.pl";s:16:"structures_graph";s:24:"structures_graph\LICENSE";s:16:"structures_graph";s:27:"structures_graph\package.sh";s:16:"structures_graph";s:27:"structures_graph\publish.sh";s:16:"structures_graph";}s:6:"script";a:3:{s:20:"\scripts/peardev.bat";s:4:"pear";s:17:"\scripts/pear.bat";s:4:"pear";s:17:"\scripts/pecl.bat";s:4:"pear";}}catalog/libs/PEAR/.lock0000644577340101002240000000000010625427725016566 0ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/Archive/0000755577340101002240000000000010625427743017230 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/Archive/Tar.php0000644577340101002240000016733010625427746020504 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Tar.php,v 1.39 2006/12/22 19:20:08 cellog Exp $ require_once 'PEAR.php'; define ('ARCHIVE_TAR_ATT_SEPARATOR', 90001); define ('ARCHIVE_TAR_END_BLOCK', pack("a512", '')); /** * Creates a (compressed) Tar archive * * @author Vincent Blavet * @version $Revision: 1.39 $ * @package Archive */ class Archive_Tar extends PEAR { /** * @var string Name of the Tar */ var $_tarname=''; /** * @var boolean if true, the Tar file will be gzipped */ var $_compress=false; /** * @var string Type of compression : 'none', 'gz' or 'bz2' */ var $_compress_type='none'; /** * @var string Explode separator */ var $_separator=' '; /** * @var file descriptor */ var $_file=0; /** * @var string Local Tar name of a remote Tar (http:// or ftp://) */ var $_temp_tarname=''; // {{{ constructor /** * Archive_Tar Class constructor. This flavour of the constructor only * declare a new Archive_Tar object, identifying it by the name of the * tar file. * If the compress argument is set the tar will be read or created as a * gzip or bz2 compressed TAR file. * * @param string $p_tarname The name of the tar archive to create * @param string $p_compress can be null, 'gz' or 'bz2'. This * parameter indicates if gzip or bz2 compression * is required. For compatibility reason the * boolean value 'true' means 'gz'. * @access public */ function Archive_Tar($p_tarname, $p_compress = null) { $this->PEAR(); $this->_compress = false; $this->_compress_type = 'none'; if (($p_compress === null) || ($p_compress == '')) { if (@file_exists($p_tarname)) { if ($fp = @fopen($p_tarname, "rb")) { // look for gzip magic cookie $data = fread($fp, 2); fclose($fp); if ($data == "\37\213") { $this->_compress = true; $this->_compress_type = 'gz'; // No sure it's enought for a magic code .... } elseif ($data == "BZ") { $this->_compress = true; $this->_compress_type = 'bz2'; } } } else { // probably a remote file or some file accessible // through a stream interface if (substr($p_tarname, -2) == 'gz') { $this->_compress = true; $this->_compress_type = 'gz'; } elseif ((substr($p_tarname, -3) == 'bz2') || (substr($p_tarname, -2) == 'bz')) { $this->_compress = true; $this->_compress_type = 'bz2'; } } } else { if (($p_compress === true) || ($p_compress == 'gz')) { $this->_compress = true; $this->_compress_type = 'gz'; } else if ($p_compress == 'bz2') { $this->_compress = true; $this->_compress_type = 'bz2'; } else { die("Unsupported compression type '$p_compress'\n". "Supported types are 'gz' and 'bz2'.\n"); return false; } } $this->_tarname = $p_tarname; if ($this->_compress) { // assert zlib or bz2 extension support if ($this->_compress_type == 'gz') $extname = 'zlib'; else if ($this->_compress_type == 'bz2') $extname = 'bz2'; if (!extension_loaded($extname)) { PEAR::loadExtension($extname); } if (!extension_loaded($extname)) { die("The extension '$extname' couldn't be found.\n". "Please make sure your version of PHP was built ". "with '$extname' support.\n"); return false; } } } // }}} // {{{ destructor function _Archive_Tar() { $this->_close(); // ----- Look for a local copy to delete if ($this->_temp_tarname != '') @unlink($this->_temp_tarname); $this->_PEAR(); } // }}} // {{{ create() /** * This method creates the archive file and add the files / directories * that are listed in $p_filelist. * If a file with the same name exist and is writable, it is replaced * by the new tar. * The method return false and a PEAR error text. * The $p_filelist parameter can be an array of string, each string * representing a filename or a directory name with their path if * needed. It can also be a single string with names separated by a * single blank. * For each directory added in the archive, the files and * sub-directories are also added. * See also createModify() method for more details. * * @param array $p_filelist An array of filenames and directory names, or a * single string with names separated by a single * blank space. * @return true on success, false on error. * @see createModify() * @access public */ function create($p_filelist) { return $this->createModify($p_filelist, '', ''); } // }}} // {{{ add() /** * This method add the files / directories that are listed in $p_filelist in * the archive. If the archive does not exist it is created. * The method return false and a PEAR error text. * The files and directories listed are only added at the end of the archive, * even if a file with the same name is already archived. * See also createModify() method for more details. * * @param array $p_filelist An array of filenames and directory names, or a * single string with names separated by a single * blank space. * @return true on success, false on error. * @see createModify() * @access public */ function add($p_filelist) { return $this->addModify($p_filelist, '', ''); } // }}} // {{{ extract() function extract($p_path='') { return $this->extractModify($p_path, ''); } // }}} // {{{ listContent() function listContent() { $v_list_detail = array(); if ($this->_openRead()) { if (!$this->_extractList('', $v_list_detail, "list", '', '')) { unset($v_list_detail); $v_list_detail = 0; } $this->_close(); } return $v_list_detail; } // }}} // {{{ createModify() /** * This method creates the archive file and add the files / directories * that are listed in $p_filelist. * If the file already exists and is writable, it is replaced by the * new tar. It is a create and not an add. If the file exists and is * read-only or is a directory it is not replaced. The method return * false and a PEAR error text. * The $p_filelist parameter can be an array of string, each string * representing a filename or a directory name with their path if * needed. It can also be a single string with names separated by a * single blank. * The path indicated in $p_remove_dir will be removed from the * memorized path of each file / directory listed when this path * exists. By default nothing is removed (empty path '') * The path indicated in $p_add_dir will be added at the beginning of * the memorized path of each file / directory listed. However it can * be set to empty ''. The adding of a path is done after the removing * of path. * The path add/remove ability enables the user to prepare an archive * for extraction in a different path than the origin files are. * See also addModify() method for file adding properties. * * @param array $p_filelist An array of filenames and directory names, * or a single string with names separated by * a single blank space. * @param string $p_add_dir A string which contains a path to be added * to the memorized path of each element in * the list. * @param string $p_remove_dir A string which contains a path to be * removed from the memorized path of each * element in the list, when relevant. * @return boolean true on success, false on error. * @access public * @see addModify() */ function createModify($p_filelist, $p_add_dir, $p_remove_dir='') { $v_result = true; if (!$this->_openWrite()) return false; if ($p_filelist != '') { if (is_array($p_filelist)) $v_list = $p_filelist; elseif (is_string($p_filelist)) $v_list = explode($this->_separator, $p_filelist); else { $this->_cleanFile(); $this->_error('Invalid file list'); return false; } $v_result = $this->_addList($v_list, $p_add_dir, $p_remove_dir); } if ($v_result) { $this->_writeFooter(); $this->_close(); } else $this->_cleanFile(); return $v_result; } // }}} // {{{ addModify() /** * This method add the files / directories listed in $p_filelist at the * end of the existing archive. If the archive does not yet exists it * is created. * The $p_filelist parameter can be an array of string, each string * representing a filename or a directory name with their path if * needed. It can also be a single string with names separated by a * single blank. * The path indicated in $p_remove_dir will be removed from the * memorized path of each file / directory listed when this path * exists. By default nothing is removed (empty path '') * The path indicated in $p_add_dir will be added at the beginning of * the memorized path of each file / directory listed. However it can * be set to empty ''. The adding of a path is done after the removing * of path. * The path add/remove ability enables the user to prepare an archive * for extraction in a different path than the origin files are. * If a file/dir is already in the archive it will only be added at the * end of the archive. There is no update of the existing archived * file/dir. However while extracting the archive, the last file will * replace the first one. This results in a none optimization of the * archive size. * If a file/dir does not exist the file/dir is ignored. However an * error text is send to PEAR error. * If a file/dir is not readable the file/dir is ignored. However an * error text is send to PEAR error. * * @param array $p_filelist An array of filenames and directory * names, or a single string with names * separated by a single blank space. * @param string $p_add_dir A string which contains a path to be * added to the memorized path of each * element in the list. * @param string $p_remove_dir A string which contains a path to be * removed from the memorized path of * each element in the list, when * relevant. * @return true on success, false on error. * @access public */ function addModify($p_filelist, $p_add_dir, $p_remove_dir='') { $v_result = true; if (!$this->_isArchive()) $v_result = $this->createModify($p_filelist, $p_add_dir, $p_remove_dir); else { if (is_array($p_filelist)) $v_list = $p_filelist; elseif (is_string($p_filelist)) $v_list = explode($this->_separator, $p_filelist); else { $this->_error('Invalid file list'); return false; } $v_result = $this->_append($v_list, $p_add_dir, $p_remove_dir); } return $v_result; } // }}} // {{{ addString() /** * This method add a single string as a file at the * end of the existing archive. If the archive does not yet exists it * is created. * * @param string $p_filename A string which contains the full * filename path that will be associated * with the string. * @param string $p_string The content of the file added in * the archive. * @return true on success, false on error. * @access public */ function addString($p_filename, $p_string) { $v_result = true; if (!$this->_isArchive()) { if (!$this->_openWrite()) { return false; } $this->_close(); } if (!$this->_openAppend()) return false; // Need to check the get back to the temporary file ? .... $v_result = $this->_addString($p_filename, $p_string); $this->_writeFooter(); $this->_close(); return $v_result; } // }}} // {{{ extractModify() /** * This method extract all the content of the archive in the directory * indicated by $p_path. When relevant the memorized path of the * files/dir can be modified by removing the $p_remove_path path at the * beginning of the file/dir path. * While extracting a file, if the directory path does not exists it is * created. * While extracting a file, if the file already exists it is replaced * without looking for last modification date. * While extracting a file, if the file already exists and is write * protected, the extraction is aborted. * While extracting a file, if a directory with the same name already * exists, the extraction is aborted. * While extracting a directory, if a file with the same name already * exists, the extraction is aborted. * While extracting a file/directory if the destination directory exist * and is write protected, or does not exist but can not be created, * the extraction is aborted. * If after extraction an extracted file does not show the correct * stored file size, the extraction is aborted. * When the extraction is aborted, a PEAR error text is set and false * is returned. However the result can be a partial extraction that may * need to be manually cleaned. * * @param string $p_path The path of the directory where the * files/dir need to by extracted. * @param string $p_remove_path Part of the memorized path that can be * removed if present at the beginning of * the file/dir path. * @return boolean true on success, false on error. * @access public * @see extractList() */ function extractModify($p_path, $p_remove_path) { $v_result = true; $v_list_detail = array(); if ($v_result = $this->_openRead()) { $v_result = $this->_extractList($p_path, $v_list_detail, "complete", 0, $p_remove_path); $this->_close(); } return $v_result; } // }}} // {{{ extractInString() /** * This method extract from the archive one file identified by $p_filename. * The return value is a string with the file content, or NULL on error. * @param string $p_filename The path of the file to extract in a string. * @return a string with the file content or NULL. * @access public */ function extractInString($p_filename) { if ($this->_openRead()) { $v_result = $this->_extractInString($p_filename); $this->_close(); } else { $v_result = NULL; } return $v_result; } // }}} // {{{ extractList() /** * This method extract from the archive only the files indicated in the * $p_filelist. These files are extracted in the current directory or * in the directory indicated by the optional $p_path parameter. * If indicated the $p_remove_path can be used in the same way as it is * used in extractModify() method. * @param array $p_filelist An array of filenames and directory names, * or a single string with names separated * by a single blank space. * @param string $p_path The path of the directory where the * files/dir need to by extracted. * @param string $p_remove_path Part of the memorized path that can be * removed if present at the beginning of * the file/dir path. * @return true on success, false on error. * @access public * @see extractModify() */ function extractList($p_filelist, $p_path='', $p_remove_path='') { $v_result = true; $v_list_detail = array(); if (is_array($p_filelist)) $v_list = $p_filelist; elseif (is_string($p_filelist)) $v_list = explode($this->_separator, $p_filelist); else { $this->_error('Invalid string list'); return false; } if ($v_result = $this->_openRead()) { $v_result = $this->_extractList($p_path, $v_list_detail, "partial", $v_list, $p_remove_path); $this->_close(); } return $v_result; } // }}} // {{{ setAttribute() /** * This method set specific attributes of the archive. It uses a variable * list of parameters, in the format attribute code + attribute values : * $arch->setAttribute(ARCHIVE_TAR_ATT_SEPARATOR, ','); * @param mixed $argv variable list of attributes and values * @return true on success, false on error. * @access public */ function setAttribute() { $v_result = true; // ----- Get the number of variable list of arguments if (($v_size = func_num_args()) == 0) { return true; } // ----- Get the arguments $v_att_list = &func_get_args(); // ----- Read the attributes $i=0; while ($i<$v_size) { // ----- Look for next option switch ($v_att_list[$i]) { // ----- Look for options that request a string value case ARCHIVE_TAR_ATT_SEPARATOR : // ----- Check the number of parameters if (($i+1) >= $v_size) { $this->_error('Invalid number of parameters for ' .'attribute ARCHIVE_TAR_ATT_SEPARATOR'); return false; } // ----- Get the value $this->_separator = $v_att_list[$i+1]; $i++; break; default : $this->_error('Unknow attribute code '.$v_att_list[$i].''); return false; } // ----- Next attribute $i++; } return $v_result; } // }}} // {{{ _error() function _error($p_message) { // ----- To be completed $this->raiseError($p_message); } // }}} // {{{ _warning() function _warning($p_message) { // ----- To be completed $this->raiseError($p_message); } // }}} // {{{ _isArchive() function _isArchive($p_filename=NULL) { if ($p_filename == NULL) { $p_filename = $this->_tarname; } clearstatcache(); return @is_file($p_filename); } // }}} // {{{ _openWrite() function _openWrite() { if ($this->_compress_type == 'gz') $this->_file = @gzopen($this->_tarname, "wb9"); else if ($this->_compress_type == 'bz2') $this->_file = @bzopen($this->_tarname, "wb"); else if ($this->_compress_type == 'none') $this->_file = @fopen($this->_tarname, "wb"); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); if ($this->_file == 0) { $this->_error('Unable to open in write mode \'' .$this->_tarname.'\''); return false; } return true; } // }}} // {{{ _openRead() function _openRead() { if (strtolower(substr($this->_tarname, 0, 7)) == 'http://') { // ----- Look if a local copy need to be done if ($this->_temp_tarname == '') { $this->_temp_tarname = uniqid('tar').'.tmp'; if (!$v_file_from = @fopen($this->_tarname, 'rb')) { $this->_error('Unable to open in read mode \'' .$this->_tarname.'\''); $this->_temp_tarname = ''; return false; } if (!$v_file_to = @fopen($this->_temp_tarname, 'wb')) { $this->_error('Unable to open in write mode \'' .$this->_temp_tarname.'\''); $this->_temp_tarname = ''; return false; } while ($v_data = @fread($v_file_from, 1024)) @fwrite($v_file_to, $v_data); @fclose($v_file_from); @fclose($v_file_to); } // ----- File to open if the local copy $v_filename = $this->_temp_tarname; } else // ----- File to open if the normal Tar file $v_filename = $this->_tarname; if ($this->_compress_type == 'gz') $this->_file = @gzopen($v_filename, "rb"); else if ($this->_compress_type == 'bz2') $this->_file = @bzopen($v_filename, "rb"); else if ($this->_compress_type == 'none') $this->_file = @fopen($v_filename, "rb"); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); if ($this->_file == 0) { $this->_error('Unable to open in read mode \''.$v_filename.'\''); return false; } return true; } // }}} // {{{ _openReadWrite() function _openReadWrite() { if ($this->_compress_type == 'gz') $this->_file = @gzopen($this->_tarname, "r+b"); else if ($this->_compress_type == 'bz2') $this->_file = @bzopen($this->_tarname, "r+b"); else if ($this->_compress_type == 'none') $this->_file = @fopen($this->_tarname, "r+b"); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); if ($this->_file == 0) { $this->_error('Unable to open in read/write mode \'' .$this->_tarname.'\''); return false; } return true; } // }}} // {{{ _close() function _close() { //if (isset($this->_file)) { if (is_resource($this->_file)) { if ($this->_compress_type == 'gz') @gzclose($this->_file); else if ($this->_compress_type == 'bz2') @bzclose($this->_file); else if ($this->_compress_type == 'none') @fclose($this->_file); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); $this->_file = 0; } // ----- Look if a local copy need to be erase // Note that it might be interesting to keep the url for a time : ToDo if ($this->_temp_tarname != '') { @unlink($this->_temp_tarname); $this->_temp_tarname = ''; } return true; } // }}} // {{{ _cleanFile() function _cleanFile() { $this->_close(); // ----- Look for a local copy if ($this->_temp_tarname != '') { // ----- Remove the local copy but not the remote tarname @unlink($this->_temp_tarname); $this->_temp_tarname = ''; } else { // ----- Remove the local tarname file @unlink($this->_tarname); } $this->_tarname = ''; return true; } // }}} // {{{ _writeBlock() function _writeBlock($p_binary_data, $p_len=null) { if (is_resource($this->_file)) { if ($p_len === null) { if ($this->_compress_type == 'gz') @gzputs($this->_file, $p_binary_data); else if ($this->_compress_type == 'bz2') @bzwrite($this->_file, $p_binary_data); else if ($this->_compress_type == 'none') @fputs($this->_file, $p_binary_data); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); } else { if ($this->_compress_type == 'gz') @gzputs($this->_file, $p_binary_data, $p_len); else if ($this->_compress_type == 'bz2') @bzwrite($this->_file, $p_binary_data, $p_len); else if ($this->_compress_type == 'none') @fputs($this->_file, $p_binary_data, $p_len); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); } } return true; } // }}} // {{{ _readBlock() function _readBlock() { $v_block = null; if (is_resource($this->_file)) { if ($this->_compress_type == 'gz') $v_block = @gzread($this->_file, 512); else if ($this->_compress_type == 'bz2') $v_block = @bzread($this->_file, 512); else if ($this->_compress_type == 'none') $v_block = @fread($this->_file, 512); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); } return $v_block; } // }}} // {{{ _jumpBlock() function _jumpBlock($p_len=null) { if (is_resource($this->_file)) { if ($p_len === null) $p_len = 1; if ($this->_compress_type == 'gz') { @gzseek($this->_file, gztell($this->_file)+($p_len*512)); } else if ($this->_compress_type == 'bz2') { // ----- Replace missing bztell() and bzseek() for ($i=0; $i<$p_len; $i++) $this->_readBlock(); } else if ($this->_compress_type == 'none') @fseek($this->_file, ftell($this->_file)+($p_len*512)); else $this->_error('Unknown or missing compression type (' .$this->_compress_type.')'); } return true; } // }}} // {{{ _writeFooter() function _writeFooter() { if (is_resource($this->_file)) { // ----- Write the last 0 filled block for end of archive $v_binary_data = pack('a1024', ''); $this->_writeBlock($v_binary_data); } return true; } // }}} // {{{ _addList() function _addList($p_list, $p_add_dir, $p_remove_dir) { $v_result=true; $v_header = array(); // ----- Remove potential windows directory separator $p_add_dir = $this->_translateWinPath($p_add_dir); $p_remove_dir = $this->_translateWinPath($p_remove_dir, false); if (!$this->_file) { $this->_error('Invalid file descriptor'); return false; } if (sizeof($p_list) == 0) return true; foreach ($p_list as $v_filename) { if (!$v_result) { break; } // ----- Skip the current tar name if ($v_filename == $this->_tarname) continue; if ($v_filename == '') continue; if (!file_exists($v_filename)) { $this->_warning("File '$v_filename' does not exist"); continue; } // ----- Add the file or directory header if (!$this->_addFile($v_filename, $v_header, $p_add_dir, $p_remove_dir)) return false; if (@is_dir($v_filename)) { if (!($p_hdir = opendir($v_filename))) { $this->_warning("Directory '$v_filename' can not be read"); continue; } while (false !== ($p_hitem = readdir($p_hdir))) { if (($p_hitem != '.') && ($p_hitem != '..')) { if ($v_filename != ".") $p_temp_list[0] = $v_filename.'/'.$p_hitem; else $p_temp_list[0] = $p_hitem; $v_result = $this->_addList($p_temp_list, $p_add_dir, $p_remove_dir); } } unset($p_temp_list); unset($p_hdir); unset($p_hitem); } } return $v_result; } // }}} // {{{ _addFile() function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir) { if (!$this->_file) { $this->_error('Invalid file descriptor'); return false; } if ($p_filename == '') { $this->_error('Invalid file name'); return false; } // ----- Calculate the stored filename $p_filename = $this->_translateWinPath($p_filename, false);; $v_stored_filename = $p_filename; if (strcmp($p_filename, $p_remove_dir) == 0) { return true; } if ($p_remove_dir != '') { if (substr($p_remove_dir, -1) != '/') $p_remove_dir .= '/'; if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir) $v_stored_filename = substr($p_filename, strlen($p_remove_dir)); } $v_stored_filename = $this->_translateWinPath($v_stored_filename); if ($p_add_dir != '') { if (substr($p_add_dir, -1) == '/') $v_stored_filename = $p_add_dir.$v_stored_filename; else $v_stored_filename = $p_add_dir.'/'.$v_stored_filename; } $v_stored_filename = $this->_pathReduction($v_stored_filename); if ($this->_isArchive($p_filename)) { if (($v_file = @fopen($p_filename, "rb")) == 0) { $this->_warning("Unable to open file '".$p_filename ."' in binary read mode"); return true; } if (!$this->_writeHeader($p_filename, $v_stored_filename)) return false; while (($v_buffer = fread($v_file, 512)) != '') { $v_binary_data = pack("a512", "$v_buffer"); $this->_writeBlock($v_binary_data); } fclose($v_file); } else { // ----- Only header for dir if (!$this->_writeHeader($p_filename, $v_stored_filename)) return false; } return true; } // }}} // {{{ _addString() function _addString($p_filename, $p_string) { if (!$this->_file) { $this->_error('Invalid file descriptor'); return false; } if ($p_filename == '') { $this->_error('Invalid file name'); return false; } // ----- Calculate the stored filename $p_filename = $this->_translateWinPath($p_filename, false);; if (!$this->_writeHeaderBlock($p_filename, strlen($p_string), time(), 384, "", 0, 0)) return false; $i=0; while (($v_buffer = substr($p_string, (($i++)*512), 512)) != '') { $v_binary_data = pack("a512", $v_buffer); $this->_writeBlock($v_binary_data); } return true; } // }}} // {{{ _writeHeader() function _writeHeader($p_filename, $p_stored_filename) { if ($p_stored_filename == '') $p_stored_filename = $p_filename; $v_reduce_filename = $this->_pathReduction($p_stored_filename); if (strlen($v_reduce_filename) > 99) { if (!$this->_writeLongHeader($v_reduce_filename)) return false; } $v_info = stat($p_filename); $v_uid = sprintf("%6s ", DecOct($v_info[4])); $v_gid = sprintf("%6s ", DecOct($v_info[5])); $v_perms = sprintf("%6s ", DecOct(fileperms($p_filename))); $v_mtime = sprintf("%11s", DecOct(filemtime($p_filename))); if (@is_dir($p_filename)) { $v_typeflag = "5"; $v_size = sprintf("%11s ", DecOct(0)); } else { $v_typeflag = ''; clearstatcache(); $v_size = sprintf("%11s ", DecOct(filesize($p_filename))); } $v_linkname = ''; $v_magic = ''; $v_version = ''; $v_uname = ''; $v_gname = ''; $v_devmajor = ''; $v_devminor = ''; $v_prefix = ''; $v_binary_data_first = pack("a100a8a8a8a12A12", $v_reduce_filename, $v_perms, $v_uid, $v_gid, $v_size, $v_mtime); $v_binary_data_last = pack("a1a100a6a2a32a32a8a8a155a12", $v_typeflag, $v_linkname, $v_magic, $v_version, $v_uname, $v_gname, $v_devmajor, $v_devminor, $v_prefix, ''); // ----- Calculate the checksum $v_checksum = 0; // ..... First part of the header for ($i=0; $i<148; $i++) $v_checksum += ord(substr($v_binary_data_first,$i,1)); // ..... Ignore the checksum value and replace it by ' ' (space) for ($i=148; $i<156; $i++) $v_checksum += ord(' '); // ..... Last part of the header for ($i=156, $j=0; $i<512; $i++, $j++) $v_checksum += ord(substr($v_binary_data_last,$j,1)); // ----- Write the first 148 bytes of the header in the archive $this->_writeBlock($v_binary_data_first, 148); // ----- Write the calculated checksum $v_checksum = sprintf("%6s ", DecOct($v_checksum)); $v_binary_data = pack("a8", $v_checksum); $this->_writeBlock($v_binary_data, 8); // ----- Write the last 356 bytes of the header in the archive $this->_writeBlock($v_binary_data_last, 356); return true; } // }}} // {{{ _writeHeaderBlock() function _writeHeaderBlock($p_filename, $p_size, $p_mtime=0, $p_perms=0, $p_type='', $p_uid=0, $p_gid=0) { $p_filename = $this->_pathReduction($p_filename); if (strlen($p_filename) > 99) { if (!$this->_writeLongHeader($p_filename)) return false; } if ($p_type == "5") { $v_size = sprintf("%11s ", DecOct(0)); } else { $v_size = sprintf("%11s ", DecOct($p_size)); } $v_uid = sprintf("%6s ", DecOct($p_uid)); $v_gid = sprintf("%6s ", DecOct($p_gid)); $v_perms = sprintf("%6s ", DecOct($p_perms)); $v_mtime = sprintf("%11s", DecOct($p_mtime)); $v_linkname = ''; $v_magic = ''; $v_version = ''; $v_uname = ''; $v_gname = ''; $v_devmajor = ''; $v_devminor = ''; $v_prefix = ''; $v_binary_data_first = pack("a100a8a8a8a12A12", $p_filename, $v_perms, $v_uid, $v_gid, $v_size, $v_mtime); $v_binary_data_last = pack("a1a100a6a2a32a32a8a8a155a12", $p_type, $v_linkname, $v_magic, $v_version, $v_uname, $v_gname, $v_devmajor, $v_devminor, $v_prefix, ''); // ----- Calculate the checksum $v_checksum = 0; // ..... First part of the header for ($i=0; $i<148; $i++) $v_checksum += ord(substr($v_binary_data_first,$i,1)); // ..... Ignore the checksum value and replace it by ' ' (space) for ($i=148; $i<156; $i++) $v_checksum += ord(' '); // ..... Last part of the header for ($i=156, $j=0; $i<512; $i++, $j++) $v_checksum += ord(substr($v_binary_data_last,$j,1)); // ----- Write the first 148 bytes of the header in the archive $this->_writeBlock($v_binary_data_first, 148); // ----- Write the calculated checksum $v_checksum = sprintf("%6s ", DecOct($v_checksum)); $v_binary_data = pack("a8", $v_checksum); $this->_writeBlock($v_binary_data, 8); // ----- Write the last 356 bytes of the header in the archive $this->_writeBlock($v_binary_data_last, 356); return true; } // }}} // {{{ _writeLongHeader() function _writeLongHeader($p_filename) { $v_size = sprintf("%11s ", DecOct(strlen($p_filename))); $v_typeflag = 'L'; $v_linkname = ''; $v_magic = ''; $v_version = ''; $v_uname = ''; $v_gname = ''; $v_devmajor = ''; $v_devminor = ''; $v_prefix = ''; $v_binary_data_first = pack("a100a8a8a8a12A12", '././@LongLink', 0, 0, 0, $v_size, 0); $v_binary_data_last = pack("a1a100a6a2a32a32a8a8a155a12", $v_typeflag, $v_linkname, $v_magic, $v_version, $v_uname, $v_gname, $v_devmajor, $v_devminor, $v_prefix, ''); // ----- Calculate the checksum $v_checksum = 0; // ..... First part of the header for ($i=0; $i<148; $i++) $v_checksum += ord(substr($v_binary_data_first,$i,1)); // ..... Ignore the checksum value and replace it by ' ' (space) for ($i=148; $i<156; $i++) $v_checksum += ord(' '); // ..... Last part of the header for ($i=156, $j=0; $i<512; $i++, $j++) $v_checksum += ord(substr($v_binary_data_last,$j,1)); // ----- Write the first 148 bytes of the header in the archive $this->_writeBlock($v_binary_data_first, 148); // ----- Write the calculated checksum $v_checksum = sprintf("%6s ", DecOct($v_checksum)); $v_binary_data = pack("a8", $v_checksum); $this->_writeBlock($v_binary_data, 8); // ----- Write the last 356 bytes of the header in the archive $this->_writeBlock($v_binary_data_last, 356); // ----- Write the filename as content of the block $i=0; while (($v_buffer = substr($p_filename, (($i++)*512), 512)) != '') { $v_binary_data = pack("a512", "$v_buffer"); $this->_writeBlock($v_binary_data); } return true; } // }}} // {{{ _readHeader() function _readHeader($v_binary_data, &$v_header) { if (strlen($v_binary_data)==0) { $v_header['filename'] = ''; return true; } if (strlen($v_binary_data) != 512) { $v_header['filename'] = ''; $this->_error('Invalid block size : '.strlen($v_binary_data)); return false; } if (!is_array($v_header)) { $v_header = array(); } // ----- Calculate the checksum $v_checksum = 0; // ..... First part of the header for ($i=0; $i<148; $i++) $v_checksum+=ord(substr($v_binary_data,$i,1)); // ..... Ignore the checksum value and replace it by ' ' (space) for ($i=148; $i<156; $i++) $v_checksum += ord(' '); // ..... Last part of the header for ($i=156; $i<512; $i++) $v_checksum+=ord(substr($v_binary_data,$i,1)); $v_data = unpack("a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/" ."a8checksum/a1typeflag/a100link/a6magic/a2version/" ."a32uname/a32gname/a8devmajor/a8devminor", $v_binary_data); // ----- Extract the checksum $v_header['checksum'] = OctDec(trim($v_data['checksum'])); if ($v_header['checksum'] != $v_checksum) { $v_header['filename'] = ''; // ----- Look for last block (empty block) if (($v_checksum == 256) && ($v_header['checksum'] == 0)) return true; $this->_error('Invalid checksum for file "'.$v_data['filename'] .'" : '.$v_checksum.' calculated, ' .$v_header['checksum'].' expected'); return false; } // ----- Extract the properties $v_header['filename'] = trim($v_data['filename']); if ($this->_maliciousFilename($v_header['filename'])) { $this->_error('Malicious .tar detected, file "' . $v_header['filename'] . '" will not install in desired directory tree'); return false; } $v_header['mode'] = OctDec(trim($v_data['mode'])); $v_header['uid'] = OctDec(trim($v_data['uid'])); $v_header['gid'] = OctDec(trim($v_data['gid'])); $v_header['size'] = OctDec(trim($v_data['size'])); $v_header['mtime'] = OctDec(trim($v_data['mtime'])); if (($v_header['typeflag'] = $v_data['typeflag']) == "5") { $v_header['size'] = 0; } $v_header['link'] = trim($v_data['link']); /* ----- All these fields are removed form the header because they do not carry interesting info $v_header[magic] = trim($v_data[magic]); $v_header[version] = trim($v_data[version]); $v_header[uname] = trim($v_data[uname]); $v_header[gname] = trim($v_data[gname]); $v_header[devmajor] = trim($v_data[devmajor]); $v_header[devminor] = trim($v_data[devminor]); */ return true; } // }}} // {{{ _maliciousFilename() /** * Detect and report a malicious file name * * @param string $file * @return bool * @access private */ function _maliciousFilename($file) { if (strpos($file, '/../') !== false) { return true; } if (strpos($file, '../') === 0) { return true; } return false; } // }}} // {{{ _readLongHeader() function _readLongHeader(&$v_header) { $v_filename = ''; $n = floor($v_header['size']/512); for ($i=0; $i<$n; $i++) { $v_content = $this->_readBlock(); $v_filename .= $v_content; } if (($v_header['size'] % 512) != 0) { $v_content = $this->_readBlock(); $v_filename .= $v_content; } // ----- Read the next header $v_binary_data = $this->_readBlock(); if (!$this->_readHeader($v_binary_data, $v_header)) return false; $v_header['filename'] = $v_filename; if ($this->_maliciousFilename($v_filename)) { $this->_error('Malicious .tar detected, file "' . $v_filename . '" will not install in desired directory tree'); return false; } return true; } // }}} // {{{ _extractInString() /** * This method extract from the archive one file identified by $p_filename. * The return value is a string with the file content, or NULL on error. * @param string $p_filename The path of the file to extract in a string. * @return a string with the file content or NULL. * @access private */ function _extractInString($p_filename) { $v_result_str = ""; While (strlen($v_binary_data = $this->_readBlock()) != 0) { if (!$this->_readHeader($v_binary_data, $v_header)) return NULL; if ($v_header['filename'] == '') continue; // ----- Look for long filename if ($v_header['typeflag'] == 'L') { if (!$this->_readLongHeader($v_header)) return NULL; } if ($v_header['filename'] == $p_filename) { if ($v_header['typeflag'] == "5") { $this->_error('Unable to extract in string a directory ' .'entry {'.$v_header['filename'].'}'); return NULL; } else { $n = floor($v_header['size']/512); for ($i=0; $i<$n; $i++) { $v_result_str .= $this->_readBlock(); } if (($v_header['size'] % 512) != 0) { $v_content = $this->_readBlock(); $v_result_str .= substr($v_content, 0, ($v_header['size'] % 512)); } return $v_result_str; } } else { $this->_jumpBlock(ceil(($v_header['size']/512))); } } return NULL; } // }}} // {{{ _extractList() function _extractList($p_path, &$p_list_detail, $p_mode, $p_file_list, $p_remove_path) { $v_result=true; $v_nb = 0; $v_extract_all = true; $v_listing = false; $p_path = $this->_translateWinPath($p_path, false); if ($p_path == '' || (substr($p_path, 0, 1) != '/' && substr($p_path, 0, 3) != "../" && !strpos($p_path, ':'))) { $p_path = "./".$p_path; } $p_remove_path = $this->_translateWinPath($p_remove_path); // ----- Look for path to remove format (should end by /) if (($p_remove_path != '') && (substr($p_remove_path, -1) != '/')) $p_remove_path .= '/'; $p_remove_path_size = strlen($p_remove_path); switch ($p_mode) { case "complete" : $v_extract_all = TRUE; $v_listing = FALSE; break; case "partial" : $v_extract_all = FALSE; $v_listing = FALSE; break; case "list" : $v_extract_all = FALSE; $v_listing = TRUE; break; default : $this->_error('Invalid extract mode ('.$p_mode.')'); return false; } clearstatcache(); while (strlen($v_binary_data = $this->_readBlock()) != 0) { $v_extract_file = FALSE; $v_extraction_stopped = 0; if (!$this->_readHeader($v_binary_data, $v_header)) return false; if ($v_header['filename'] == '') { continue; } // ----- Look for long filename if ($v_header['typeflag'] == 'L') { if (!$this->_readLongHeader($v_header)) return false; } if ((!$v_extract_all) && (is_array($p_file_list))) { // ----- By default no unzip if the file is not found $v_extract_file = false; for ($i=0; $i strlen($p_file_list[$i])) && (substr($v_header['filename'], 0, strlen($p_file_list[$i])) == $p_file_list[$i])) { $v_extract_file = TRUE; break; } } // ----- It is a file, so compare the file names elseif ($p_file_list[$i] == $v_header['filename']) { $v_extract_file = TRUE; break; } } } else { $v_extract_file = TRUE; } // ----- Look if this file need to be extracted if (($v_extract_file) && (!$v_listing)) { if (($p_remove_path != '') && (substr($v_header['filename'], 0, $p_remove_path_size) == $p_remove_path)) $v_header['filename'] = substr($v_header['filename'], $p_remove_path_size); if (($p_path != './') && ($p_path != '/')) { while (substr($p_path, -1) == '/') $p_path = substr($p_path, 0, strlen($p_path)-1); if (substr($v_header['filename'], 0, 1) == '/') $v_header['filename'] = $p_path.$v_header['filename']; else $v_header['filename'] = $p_path.'/'.$v_header['filename']; } if (file_exists($v_header['filename'])) { if ( (@is_dir($v_header['filename'])) && ($v_header['typeflag'] == '')) { $this->_error('File '.$v_header['filename'] .' already exists as a directory'); return false; } if ( ($this->_isArchive($v_header['filename'])) && ($v_header['typeflag'] == "5")) { $this->_error('Directory '.$v_header['filename'] .' already exists as a file'); return false; } if (!is_writeable($v_header['filename'])) { $this->_error('File '.$v_header['filename'] .' already exists and is write protected'); return false; } if (filemtime($v_header['filename']) > $v_header['mtime']) { // To be completed : An error or silent no replace ? } } // ----- Check the directory availability and create it if necessary elseif (($v_result = $this->_dirCheck(($v_header['typeflag'] == "5" ?$v_header['filename'] :dirname($v_header['filename'])))) != 1) { $this->_error('Unable to create path for '.$v_header['filename']); return false; } if ($v_extract_file) { if ($v_header['typeflag'] == "5") { if (!@file_exists($v_header['filename'])) { if (!@mkdir($v_header['filename'], 0777)) { $this->_error('Unable to create directory {' .$v_header['filename'].'}'); return false; } } } elseif ($v_header['typeflag'] == "2") { if (!@symlink($v_header['link'], $v_header['filename'])) { $this->_error('Unable to extract symbolic link {' .$v_header['filename'].'}'); return false; } } else { if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) { $this->_error('Error while opening {'.$v_header['filename'] .'} in write binary mode'); return false; } else { $n = floor($v_header['size']/512); for ($i=0; $i<$n; $i++) { $v_content = $this->_readBlock(); fwrite($v_dest_file, $v_content, 512); } if (($v_header['size'] % 512) != 0) { $v_content = $this->_readBlock(); fwrite($v_dest_file, $v_content, ($v_header['size'] % 512)); } @fclose($v_dest_file); // ----- Change the file mode, mtime @touch($v_header['filename'], $v_header['mtime']); if ($v_header['mode'] & 0111) { // make file executable, obey umask $mode = fileperms($v_header['filename']) | (~umask() & 0111); @chmod($v_header['filename'], $mode); } } // ----- Check the file size clearstatcache(); if (filesize($v_header['filename']) != $v_header['size']) { $this->_error('Extracted file '.$v_header['filename'] .' does not have the correct file size \'' .filesize($v_header['filename']) .'\' ('.$v_header['size'] .' expected). Archive may be corrupted.'); return false; } } } else { $this->_jumpBlock(ceil(($v_header['size']/512))); } } else { $this->_jumpBlock(ceil(($v_header['size']/512))); } /* TBC : Seems to be unused ... if ($this->_compress) $v_end_of_file = @gzeof($this->_file); else $v_end_of_file = @feof($this->_file); */ if ($v_listing || $v_extract_file || $v_extraction_stopped) { // ----- Log extracted files if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) $v_file_dir = ''; if ((substr($v_header['filename'], 0, 1) == '/') && ($v_file_dir == '')) $v_file_dir = '/'; $p_list_detail[$v_nb++] = $v_header; if (is_array($p_file_list) && (count($p_list_detail) == count($p_file_list))) { return true; } } } return true; } // }}} // {{{ _openAppend() function _openAppend() { if (filesize($this->_tarname) == 0) return $this->_openWrite(); if ($this->_compress) { $this->_close(); if (!@rename($this->_tarname, $this->_tarname.".tmp")) { $this->_error('Error while renaming \''.$this->_tarname .'\' to temporary file \''.$this->_tarname .'.tmp\''); return false; } if ($this->_compress_type == 'gz') $v_temp_tar = @gzopen($this->_tarname.".tmp", "rb"); elseif ($this->_compress_type == 'bz2') $v_temp_tar = @bzopen($this->_tarname.".tmp", "rb"); if ($v_temp_tar == 0) { $this->_error('Unable to open file \''.$this->_tarname .'.tmp\' in binary read mode'); @rename($this->_tarname.".tmp", $this->_tarname); return false; } if (!$this->_openWrite()) { @rename($this->_tarname.".tmp", $this->_tarname); return false; } if ($this->_compress_type == 'gz') { while (!@gzeof($v_temp_tar)) { $v_buffer = @gzread($v_temp_tar, 512); if ($v_buffer == ARCHIVE_TAR_END_BLOCK) { // do not copy end blocks, we will re-make them // after appending continue; } $v_binary_data = pack("a512", $v_buffer); $this->_writeBlock($v_binary_data); } @gzclose($v_temp_tar); } elseif ($this->_compress_type == 'bz2') { while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) { if ($v_buffer == ARCHIVE_TAR_END_BLOCK) { continue; } $v_binary_data = pack("a512", $v_buffer); $this->_writeBlock($v_binary_data); } @bzclose($v_temp_tar); } if (!@unlink($this->_tarname.".tmp")) { $this->_error('Error while deleting temporary file \'' .$this->_tarname.'.tmp\''); } } else { // ----- For not compressed tar, just add files before the last // one or two 512 bytes block if (!$this->_openReadWrite()) return false; clearstatcache(); $v_size = filesize($this->_tarname); // We might have zero, one or two end blocks. // The standard is two, but we should try to handle // other cases. fseek($this->_file, $v_size - 1024); if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) { fseek($this->_file, $v_size - 1024); } elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) { fseek($this->_file, $v_size - 512); } } return true; } // }}} // {{{ _append() function _append($p_filelist, $p_add_dir='', $p_remove_dir='') { if (!$this->_openAppend()) return false; if ($this->_addList($p_filelist, $p_add_dir, $p_remove_dir)) $this->_writeFooter(); $this->_close(); return true; } // }}} // {{{ _dirCheck() /** * Check if a directory exists and create it (including parent * dirs) if not. * * @param string $p_dir directory to check * * @return bool TRUE if the directory exists or was created */ function _dirCheck($p_dir) { clearstatcache(); if ((@is_dir($p_dir)) || ($p_dir == '')) return true; $p_parent_dir = dirname($p_dir); if (($p_parent_dir != $p_dir) && ($p_parent_dir != '') && (!$this->_dirCheck($p_parent_dir))) return false; if (!@mkdir($p_dir, 0777)) { $this->_error("Unable to create directory '$p_dir'"); return false; } return true; } // }}} // {{{ _pathReduction() /** * Compress path by changing for example "/dir/foo/../bar" to "/dir/bar", * rand emove double slashes. * * @param string $p_dir path to reduce * * @return string reduced path * * @access private * */ function _pathReduction($p_dir) { $v_result = ''; // ----- Look for not empty path if ($p_dir != '') { // ----- Explode path by directory names $v_list = explode('/', $p_dir); // ----- Study directories from last to first for ($i=sizeof($v_list)-1; $i>=0; $i--) { // ----- Look for current path if ($v_list[$i] == ".") { // ----- Ignore this directory // Should be the first $i=0, but no check is done } else if ($v_list[$i] == "..") { // ----- Ignore it and ignore the $i-1 $i--; } else if ( ($v_list[$i] == '') && ($i!=(sizeof($v_list)-1)) && ($i!=0)) { // ----- Ignore only the double '//' in path, // but not the first and last / } else { $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?'/' .$v_result:''); } } } $v_result = strtr($v_result, '\\', '/'); return $v_result; } // }}} // {{{ _translateWinPath() function _translateWinPath($p_path, $p_remove_disk_letter=true) { if (defined('OS_WINDOWS') && OS_WINDOWS) { // ----- Look for potential disk letter if ( ($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) { $p_path = substr($p_path, $v_position+1); } // ----- Change potential windows directory separator if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) { $p_path = strtr($p_path, '\\', '/'); } } return $p_path; } // }}} } ?> catalog/libs/PEAR/Console/0000755577340101002240000000000010625427744017252 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/Console/Getopt.php0000644577340101002240000002247710625427745021242 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Getopt.php,v 1.29 2006/12/08 17:28:37 andrei Exp $ require_once 'PEAR.php'; /** * Command-line options parsing class. * * @author Andrei Zmievski * */ class Console_Getopt { /** * Parses the command-line options. * * The first parameter to this function should be the list of command-line * arguments without the leading reference to the running program. * * The second parameter is a string of allowed short options. Each of the * option letters can be followed by a colon ':' to specify that the option * requires an argument, or a double colon '::' to specify that the option * takes an optional argument. * * The third argument is an optional array of allowed long options. The * leading '--' should not be included in the option name. Options that * require an argument should be followed by '=', and options that take an * option argument should be followed by '=='. * * The return value is an array of two elements: the list of parsed * options and the list of non-option command-line arguments. Each entry in * the list of parsed options is a pair of elements - the first one * specifies the option, and the second one specifies the option argument, * if there was one. * * Long and short options can be mixed. * * Most of the semantics of this function are based on GNU getopt_long(). * * @param array $args an array of command-line arguments * @param string $short_options specifies the list of allowed short options * @param array $long_options specifies the list of allowed long options * * @return array two-element array containing the list of parsed options and * the non-option arguments * * @access public * */ function getopt2($args, $short_options, $long_options = null) { return Console_Getopt::doGetopt(2, $args, $short_options, $long_options); } /** * This function expects $args to start with the script name (POSIX-style). * Preserved for backwards compatibility. * @see getopt2() */ function getopt($args, $short_options, $long_options = null) { return Console_Getopt::doGetopt(1, $args, $short_options, $long_options); } /** * The actual implementation of the argument parsing code. */ function doGetopt($version, $args, $short_options, $long_options = null) { // in case you pass directly readPHPArgv() as the first arg if (PEAR::isError($args)) { return $args; } if (empty($args)) { return array(array(), array()); } $opts = array(); $non_opts = array(); settype($args, 'array'); if ($long_options) { sort($long_options); } /* * Preserve backwards compatibility with callers that relied on * erroneous POSIX fix. */ if ($version < 2) { if (isset($args[0]{0}) && $args[0]{0} != '-') { array_shift($args); } } reset($args); while (list($i, $arg) = each($args)) { /* The special element '--' means explicit end of options. Treat the rest of the arguments as non-options and end the loop. */ if ($arg == '--') { $non_opts = array_merge($non_opts, array_slice($args, $i + 1)); break; } if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) { $non_opts = array_merge($non_opts, array_slice($args, $i)); break; } elseif (strlen($arg) > 1 && $arg{1} == '-') { $error = Console_Getopt::_parseLongOption(substr($arg, 2), $long_options, $opts, $args); if (PEAR::isError($error)) return $error; } else { $error = Console_Getopt::_parseShortOption(substr($arg, 1), $short_options, $opts, $args); if (PEAR::isError($error)) return $error; } } return array($opts, $non_opts); } /** * @access private * */ function _parseShortOption($arg, $short_options, &$opts, &$args) { for ($i = 0; $i < strlen($arg); $i++) { $opt = $arg{$i}; $opt_arg = null; /* Try to find the short option in the specifier string. */ if (($spec = strstr($short_options, $opt)) === false || $arg{$i} == ':') { return PEAR::raiseError("Console_Getopt: unrecognized option -- $opt"); } if (strlen($spec) > 1 && $spec{1} == ':') { if (strlen($spec) > 2 && $spec{2} == ':') { if ($i + 1 < strlen($arg)) { /* Option takes an optional argument. Use the remainder of the arg string if there is anything left. */ $opts[] = array($opt, substr($arg, $i + 1)); break; } } else { /* Option requires an argument. Use the remainder of the arg string if there is anything left. */ if ($i + 1 < strlen($arg)) { $opts[] = array($opt, substr($arg, $i + 1)); break; } else if (list(, $opt_arg) = each($args)) /* Else use the next argument. */; else return PEAR::raiseError("Console_Getopt: option requires an argument -- $opt"); } } $opts[] = array($opt, $opt_arg); } } /** * @access private * */ function _parseLongOption($arg, $long_options, &$opts, &$args) { @list($opt, $opt_arg) = explode('=', $arg, 2); $opt_len = strlen($opt); for ($i = 0; $i < count($long_options); $i++) { $long_opt = $long_options[$i]; $opt_start = substr($long_opt, 0, $opt_len); /* Option doesn't match. Go on to the next one. */ if ($opt_start != $opt) continue; $opt_rest = substr($long_opt, $opt_len); /* Check that the options uniquely matches one of the allowed options. */ if ($opt_rest != '' && $opt{0} != '=' && $i + 1 < count($long_options) && $opt == substr($long_options[$i+1], 0, $opt_len)) { return PEAR::raiseError("Console_Getopt: option --$opt is ambiguous"); } if (substr($long_opt, -1) == '=') { if (substr($long_opt, -2) != '==') { /* Long option requires an argument. Take the next argument if one wasn't specified. */; if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) { return PEAR::raiseError("Console_Getopt: option --$opt requires an argument"); } } } else if ($opt_arg) { return PEAR::raiseError("Console_Getopt: option --$opt doesn't allow an argument"); } $opts[] = array('--' . $opt, $opt_arg); return; } return PEAR::raiseError("Console_Getopt: unrecognized option --$opt"); } /** * Safely read the $argv PHP array across different PHP configurations. * Will take care on register_globals and register_argc_argv ini directives * * @access public * @return mixed the $argv PHP array or PEAR error if not registered */ function readPHPArgv() { global $argv; if (!is_array($argv)) { if (!@is_array($_SERVER['argv'])) { if (!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) { return PEAR::raiseError("Console_Getopt: Could not read cmd args (register_argc_argv=Off?)"); } return $GLOBALS['HTTP_SERVER_VARS']['argv']; } return $_SERVER['argv']; } return $argv; } } ?> catalog/libs/PEAR/data/0000755577340101002240000000000010625427751016557 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/data/MDB2/0000755577340101002240000000000010625427750017242 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/data/MDB2/LICENSE0000644577340101002240000000550710625427751020257 0ustar tonerlogicspg11675700000000000000// +----------------------------------------------------------------------+ // | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox, | // | Stig. S. Bakken, Lukas Smith | // | All rights reserved. | // +----------------------------------------------------------------------+ // | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB | // | API as well as database abstraction for PHP applications. | // | This LICENSE is in the BSD license style. | // | | // | Redistribution and use in source and binary forms, with or without | // | modification, are permitted provided that the following conditions | // | are met: | // | | // | Redistributions of source code must retain the above copyright | // | notice, this list of conditions and the following disclaimer. | // | | // | Redistributions in binary form must reproduce the above copyright | // | notice, this list of conditions and the following disclaimer in the | // | documentation and/or other materials provided with the distribution. | // | | // | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken, | // | Lukas Smith nor the names of his contributors may be used to endorse | // | or promote products derived from this software without specific prior| // | written permission. | // | | // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | // | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | // | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | // | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | // | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS| // | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | // | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | // | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY| // | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | // | POSSIBILITY OF SUCH DAMAGE. | // +----------------------------------------------------------------------+catalog/libs/PEAR/data/PEAR/0000755577340101002240000000000010625427751017306 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/data/PEAR/package.dtd0000644577340101002240000000647710625427751021414 0ustar tonerlogicspg11675700000000000000 catalog/libs/PEAR/data/PEAR/template.spec0000644577340101002240000000372510625427752022005 0ustar tonerlogicspg11675700000000000000Summary: PEAR: @summary@ Name: @rpm_package@ Version: @version@ Release: 1 License: @release_license@ Group: Development/Libraries Source: http://@master_server@/get/@package@-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-root URL: http://@master_server@/package/@package@ Prefix: %{_prefix} BuildArchitectures: @arch@ @extra_headers@ %description @description@ %prep rm -rf %{buildroot}/* %setup -c -T # XXX Source files location is missing here in pear cmd pear -v -c %{buildroot}/pearrc \ -d php_dir=%{_libdir}/php/pear \ -d doc_dir=/docs \ -d bin_dir=%{_bindir} \ -d data_dir=%{_libdir}/php/pear/data \ -d test_dir=%{_libdir}/php/pear/tests \ -d ext_dir=%{_libdir} \@extra_config@ -s %build echo BuildRoot=%{buildroot} %postun # if refcount = 0 then package has been removed (not upgraded) if [ "$1" -eq "0" ]; then pear uninstall --nodeps -r @possible_channel@@package@ rm @rpm_xml_dir@/@package@.xml fi %post # if refcount = 2 then package has been upgraded if [ "$1" -ge "2" ]; then pear upgrade --nodeps -r @rpm_xml_dir@/@package@.xml else pear install --nodeps -r @rpm_xml_dir@/@package@.xml fi %install pear -c %{buildroot}/pearrc install --nodeps -R %{buildroot} \ $RPM_SOURCE_DIR/@package@-%{version}.tgz rm %{buildroot}/pearrc rm %{buildroot}/%{_libdir}/php/pear/.filemap rm %{buildroot}/%{_libdir}/php/pear/.lock rm -rf %{buildroot}/%{_libdir}/php/pear/.registry if [ "@doc_files@" != "" ]; then mv %{buildroot}/docs/@package@/* . rm -rf %{buildroot}/docs fi mkdir -p %{buildroot}@rpm_xml_dir@ tar -xzf $RPM_SOURCE_DIR/@package@-%{version}.tgz package@package2xml@.xml cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml #rm -rf %{buildroot}/* #pear -q install -R %{buildroot} -n package@package2xml@.xml #mkdir -p %{buildroot}@rpm_xml_dir@ #cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml %files %defattr(-,root,root) %doc @doc_files@ / catalog/libs/PEAR/data/Structures_Graph/0000755577340101002240000000000010625427755022067 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/data/Structures_Graph/genpackage.xml.pl0000644577340101002240000000064210625427753025310 0ustar tonerlogicspg11675700000000000000#!/usr/bin/perl while (<>) { if (!/FILESGOHERE/) { print $_; } else { open FILELIST,'find Structures -type f | grep -v .arch-ids |'; while () { $md5sum = `md5sum $_`; chomp($md5sum); $md5sum = substr $md5sum, 0, 32; # $_ =~ s/\//\\\//g; chomp($_); print " \n"; } } } catalog/libs/PEAR/data/Structures_Graph/LICENSE0000644577340101002240000006347610625427754023113 0ustar tonerlogicspg11675700000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! catalog/libs/PEAR/data/Structures_Graph/package.sh0000644577340101002240000000302710625427754024017 0ustar tonerlogicspg11675700000000000000#!/bin/bash VERSION=`tla tree-version 2>&1 | sed "s/^.*\([0-9][0-9]*\.[0-9][0-9]*\)$/\1/g"` TARGET_DIR=BUILD/ TARGET_DIRS=`find Structures -type d | grep -v .arch-ids` mkdir -p $TARGET_DIR ./genpackage.xml.pl > BUILD/package.xml << EOF Structures_Graph Graph datastructure manipulation library LGPL Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed and undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing as well as for characteristic extraction from the graph topology. sergiosgc Sérgio Carvalho sergio.carvalho@portugalmail.com lead 1.0.3 2007-01-30 stable Version 1.0.3 is functionally equivalent to 1.0.2, but released with a v1.0 package.xml to deal with bug #9965:installation problem FILESGOHERE PEAR EOF for dir in $TARGET_DIRS do mkdir -p $TARGET_DIR/$dir cp `find $dir -maxdepth 1 -type f | grep -v .arch-ids` $TARGET_DIR/$dir done cp LICENSE BUILD (cd BUILD; pear package) rm -Rf BUILD/package.xml BUILD/LICENSE BUILD/Structures catalog/libs/PEAR/data/Structures_Graph/publish.sh0000644577340101002240000000041110625427755024065 0ustar tonerlogicspg11675700000000000000#!/bin/sh ./package.sh scp BUILD/*.tgz root@sergiocarvalho.com:/home/httpd/vhosts/com/sergiocarvalho/pear-base/pear (cd docs; ./generate.sh) scp -r docs/html/* root@iluvatar.portugalmail.pt:/home/httpd/vhosts/com/sergiocarvalho/pear-base/pear/docs/Structures_Graph catalog/libs/PEAR/docs/0000755577340101002240000000000010625430000016553 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Archive_Tar/0000755577340101002240000000000010625427756020772 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Archive_Tar/docs/0000755577340101002240000000000010625427760021715 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Archive_Tar/docs/Archive_Tar.txt0000644577340101002240000004367310625427761024663 0ustar tonerlogicspg11675700000000000000Documentation for class Archive_Tar =================================== Last update : 2001-08-15 Overview : ---------- The Archive_Tar class helps in creating and managing GNU TAR format files compressed by GNU ZIP or not. The class offers basic functions like creating an archive, adding files in the archive, extracting files from the archive and listing the archive content. It also provide advanced functions that allow the adding and extraction of files with path manipulation. Sample : -------- // ----- Creating the object (uncompressed archive) $tar_object = new Archive_Tar("tarname.tar"); $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // ----- Creating the archive $v_list[0]="file.txt"; $v_list[1]="data/"; $v_list[2]="file.log"; $tar_object->create($v_list); // ----- Adding files $v_list[0]="dev/file.txt"; $v_list[1]="dev/data/"; $v_list[2]="log/file.log"; $tar_object->add($v_list); // ----- Adding more files $tar_object->add("release/newfile.log release/readme.txt"); // ----- Listing the content if (($v_list = $tar_object->listContent()) != 0) for ($i=0; $i"; echo " .size :'".$v_list[$i][size]."'
"; echo " .mtime :'".$v_list[$i][mtime]."' (".date("l dS of F Y h:i:s A", $v_list[$i][mtime]).")
"; echo " .mode :'".$v_list[$i][mode]."'
"; echo " .uid :'".$v_list[$i][uid]."'
"; echo " .gid :'".$v_list[$i][gid]."'
"; echo " .typeflag :'".$v_list[$i][typeflag]."'
"; } // ----- Extracting the archive in directory "install" $tar_object->extract("install"); Public arguments : ------------------ None Public Methods : ---------------- Method : Archive_Tar($p_tarname, $compress = null) Description : Archive_Tar Class constructor. This flavour of the constructor only declare a new Archive_Tar object, identifying it by the name of the tar file. If the compress argument is set the tar will be read or created as a gzip or bz2 compressed TAR file. Arguments : $p_tarname : A valid filename for the tar archive file. $p_compress : can be null, 'gz' or 'bz2'. For compatibility reason it can also be true. This parameter indicates if gzip or bz2 compression is required. Return value : The Archive_Tar object. Sample : $tar_object = new Archive_Tar("tarname.tar"); $tar_object_compressed = new Archive_Tar("tarname.tgz", true); How it works : Initialize the object. Method : create($p_filelist) Description : This method creates the archive file and add the files / directories that are listed in $p_filelist. If the file already exists and is writable, it is replaced by the new tar. It is a create and not an add. If the file exists and is read-only or is a directory it is not replaced. The method return false and a PEAR error text. The $p_filelist parameter can be an array of string, each string representing a filename or a directory name with their path if needed. It can also be a single string with names separated by a single blank. See also createModify() method for more details. Arguments : $p_filelist : An array of filenames and directory names, or a single string with names separated by a single blank space. Return value : true on success, false on error. Sample 1 : $tar_object = new Archive_Tar("tarname.tar"); $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling $v_list[0]="file.txt"; $v_list[1]="data/"; (Optional '/' at the end) $v_list[2]="file.log"; $tar_object->create($v_list); Sample 2 : $tar_object = new Archive_Tar("tarname.tar"); $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling $tar_object->create("file.txt data/ file.log"); How it works : Just calling the createModify() method with the right parameters. Method : createModify($p_filelist, $p_add_dir, $p_remove_dir = "") Description : This method creates the archive file and add the files / directories that are listed in $p_filelist. If the file already exists and is writable, it is replaced by the new tar. It is a create and not an add. If the file exists and is read-only or is a directory it is not replaced. The method return false and a PEAR error text. The $p_filelist parameter can be an array of string, each string representing a filename or a directory name with their path if needed. It can also be a single string with names separated by a single blank. The path indicated in $p_remove_dir will be removed from the memorized path of each file / directory listed when this path exists. By default nothing is removed (empty path "") The path indicated in $p_add_dir will be added at the beginning of the memorized path of each file / directory listed. However it can be set to empty "". The adding of a path is done after the removing of path. The path add/remove ability enables the user to prepare an archive for extraction in a different path than the origin files are. See also addModify() method for file adding properties. Arguments : $p_filelist : An array of filenames and directory names, or a single string with names separated by a single blank space. $p_add_dir : A string which contains a path to be added to the memorized path of each element in the list. $p_remove_dir : A string which contains a path to be removed from the memorized path of each element in the list, when relevant. Return value : true on success, false on error. Sample 1 : $tar_object = new Archive_Tar("tarname.tar"); $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling $v_list[0]="file.txt"; $v_list[1]="data/"; (Optional '/' at the end) $v_list[2]="file.log"; $tar_object->createModify($v_list, "install"); // files are stored in the archive as : // install/file.txt // install/data // install/data/file1.txt // install/data/... all the files and sub-dirs of data/ // install/file.log Sample 2 : $tar_object = new Archive_Tar("tarname.tar"); $tar_object->setErrorHandling(PEAR_ERROR_PRINT); // Optional error handling $v_list[0]="dev/file.txt"; $v_list[1]="dev/data/"; (Optional '/' at the end) $v_list[2]="log/file.log"; $tar_object->createModify($v_list, "install", "dev"); // files are stored in the archive as : // install/file.txt // install/data // install/data/file1.txt // install/data/... all the files and sub-dirs of data/ // install/log/file.log How it works : Open the file in write mode (erasing the existing one if one), call the _addList() method for adding the files in an empty archive, add the tar footer (512 bytes block), close the tar file. Method : addModify($p_filelist, $p_add_dir, $p_remove_dir="") Description : This method add the files / directories listed in $p_filelist at the end of the existing archive. If the archive does not yet exists it is created. The $p_filelist parameter can be an array of string, each string representing a filename or a directory name with their path if needed. It can also be a single string with names separated by a single blank. The path indicated in $p_remove_dir will be removed from the memorized path of each file / directory listed when this path exists. By default nothing is removed (empty path "") The path indicated in $p_add_dir will be added at the beginning of the memorized path of each file / directory listed. However it can be set to empty "". The adding of a path is done after the removing of path. The path add/remove ability enables the user to prepare an archive for extraction in a different path than the origin files are. If a file/dir is already in the archive it will only be added at the end of the archive. There is no update of the existing archived file/dir. However while extracting the archive, the last file will replace the first one. This results in a none optimization of the archive size. If a file/dir does not exist the file/dir is ignored. However an error text is send to PEAR error. If a file/dir is not readable the file/dir is ignored. However an error text is send to PEAR error. If the resulting filename/dirname (after the add/remove option or not) string is greater than 99 char, the file/dir is ignored. However an error text is send to PEAR error. Arguments : $p_filelist : An array of filenames and directory names, or a single string with names separated by a single blank space. $p_add_dir : A string which contains a path to be added to the memorized path of each element in the list. $p_remove_dir : A string which contains a path to be removed from the memorized path of each element in the list, when relevant. Return value : true on success, false on error. Sample 1 : $tar_object = new Archive_Tar("tarname.tar"); [...] $v_list[0]="dev/file.txt"; $v_list[1]="dev/data/"; (Optional '/' at the end) $v_list[2]="log/file.log"; $tar_object->addModify($v_list, "install"); // files are stored in the archive as : // install/file.txt // install/data // install/data/file1.txt // install/data/... all the files and sub-dirs of data/ // install/file.log Sample 2 : $tar_object = new Archive_Tar("tarname.tar"); [...] $v_list[0]="dev/file.txt"; $v_list[1]="dev/data/"; (Optional '/' at the end) $v_list[2]="log/file.log"; $tar_object->addModify($v_list, "install", "dev"); // files are stored in the archive as : // install/file.txt // install/data // install/data/file1.txt // install/data/... all the files and sub-dirs of data/ // install/log/file.log How it works : If the archive does not exists it create it and add the files. If the archive does exists and is not compressed, it open it, jump before the last empty 512 bytes block (tar footer) and add the files at this point. If the archive does exists and is compressed, a temporary copy file is created. This temporary file is then 'gzip' read block by block until the last empty block. The new files are then added in the compressed file. The adding of files is done by going through the file/dir list, adding files per files, in a recursive way through the directory. Each time a path need to be added/removed it is done before writing the file header in the archive. Method : add($p_filelist) Description : This method add the files / directories listed in $p_filelist at the end of the existing archive. If the archive does not yet exists it is created. The $p_filelist parameter can be an array of string, each string representing a filename or a directory name with their path if needed. It can also be a single string with names separated by a single blank. See addModify() method for details and limitations. Arguments : $p_filelist : An array of filenames and directory names, or a single string with names separated by a single blank space. Return value : true on success, false on error. Sample 1 : $tar_object = new Archive_Tar("tarname.tar"); [...] $v_list[0]="dev/file.txt"; $v_list[1]="dev/data/"; (Optional '/' at the end) $v_list[2]="log/file.log"; $tar_object->add($v_list); Sample 2 : $tar_object = new Archive_Tar("tarname.tgz", true); [...] $v_list[0]="dev/file.txt"; $v_list[1]="dev/data/"; (Optional '/' at the end) $v_list[2]="log/file.log"; $tar_object->add($v_list); How it works : Simply call the addModify() method with the right parameters. Method : addString($p_filename, $p_string) Description : This method add a single string as a file at the end of the existing archive. If the archive does not yet exists it is created. Arguments : $p_filename : A string which contains the full filename path that will be associated with the string. $p_string : The content of the file added in the archive. Return value : true on success, false on error. Sample 1 : $v_archive = & new Archive_Tar($p_filename); $v_archive->setErrorHandling(PEAR_ERROR_PRINT); $v_result = $v_archive->addString('data/test.txt', 'This is the text of the string'); Method : extract($p_path = "") Description : This method extract all the content of the archive in the directory indicated by $p_path.If $p_path is optional, if not set the archive is extracted in the current directory. While extracting a file, if the directory path does not exists it is created. See extractModify() for details and limitations. Arguments : $p_path : Optional path where the files/dir need to by extracted. Return value : true on success, false on error. Sample : $tar_object = new Archive_Tar("tarname.tar"); $tar_object->extract(); How it works : Simply call the extractModify() method with appropriate parameters. Method : extractModify($p_path, $p_remove_path) Description : This method extract all the content of the archive in the directory indicated by $p_path. When relevant the memorized path of the files/dir can be modified by removing the $p_remove_path path at the beginning of the file/dir path. While extracting a file, if the directory path does not exists it is created. While extracting a file, if the file already exists it is replaced without looking for last modification date. While extracting a file, if the file already exists and is write protected, the extraction is aborted. While extracting a file, if a directory with the same name already exists, the extraction is aborted. While extracting a directory, if a file with the same name already exists, the extraction is aborted. While extracting a file/directory if the destination directory exist and is write protected, or does not exist but can not be created, the extraction is aborted. If after extraction an extracted file does not show the correct stored file size, the extraction is aborted. When the extraction is aborted, a PEAR error text is set and false is returned. However the result can be a partial extraction that may need to be manually cleaned. Arguments : $p_path : The path of the directory where the files/dir need to by extracted. $p_remove_path : Part of the memorized path that can be removed if present at the beginning of the file/dir path. Return value : true on success, false on error. Sample : // Imagine tarname.tar with files : // dev/data/file.txt // dev/data/log.txt // readme.txt $tar_object = new Archive_Tar("tarname.tar"); $tar_object->extractModify("install", "dev"); // Files will be extracted there : // install/data/file.txt // install/data/log.txt // install/readme.txt How it works : Open the archive and call a more generic function that can extract only a part of the archive or all the archive. See extractList() method for more details. Method : extractInString($p_filename) Description : This method extract from the archive one file identified by $p_filename. The return value is a string with the file content, or NULL on error. Arguments : $p_filename : The path of the file to extract in a string. Return value : a string with the file content or NULL. Sample : // Imagine tarname.tar with files : // dev/data/file.txt // dev/data/log.txt // dev/readme.txt $v_archive = & new Archive_Tar('tarname.tar'); $v_archive->setErrorHandling(PEAR_ERROR_PRINT); $v_string = $v_archive->extractInString('dev/readme.txt'); echo $v_string; Method : listContent() Description : This method returns an array of arrays that describe each file/directory present in the archive. The array is not sorted, so it show the position of the file in the archive. The file informations are : $file[filename] : Name and path of the file/dir. $file[mode] : File permissions (result of fileperms()) $file[uid] : user id $file[gid] : group id $file[size] : filesize $file[mtime] : Last modification time (result of filemtime()) $file[typeflag] : "" for file, "5" for directory Arguments : Return value : An array of arrays or 0 on error. Sample : $tar_object = new Archive_Tar("tarname.tar"); if (($v_list = $tar_object->listContent()) != 0) for ($i=0; $i"; echo " .size :'".$v_list[$i][size]."'
"; echo " .mtime :'".$v_list[$i][mtime]."' (". date("l dS of F Y h:i:s A", $v_list[$i][mtime]).")
"; echo " .mode :'".$v_list[$i][mode]."'
"; echo " .uid :'".$v_list[$i][uid]."'
"; echo " .gid :'".$v_list[$i][gid]."'
"; echo " .typeflag :'".$v_list[$i][typeflag]."'
"; } How it works : Call the same function as an extract however with a flag to only go through the archive without extracting the files. Method : extractList($p_filelist, $p_path = "", $p_remove_path = "") Description : This method extract from the archive only the files indicated in the $p_filelist. These files are extracted in the current directory or in the directory indicated by the optional $p_path parameter. If indicated the $p_remove_path can be used in the same way as it is used in extractModify() method. Arguments : $p_filelist : An array of filenames and directory names, or a single string with names separated by a single blank space. $p_path : The path of the directory where the files/dir need to by extracted. $p_remove_path : Part of the memorized path that can be removed if present at the beginning of the file/dir path. Return value : true on success, false on error. Sample : // Imagine tarname.tar with files : // dev/data/file.txt // dev/data/log.txt // readme.txt $tar_object = new Archive_Tar("tarname.tar"); $tar_object->extractList("dev/data/file.txt readme.txt", "install", "dev"); // Files will be extracted there : // install/data/file.txt // install/readme.txt How it works : Go through the archive and extract only the files present in the list. catalog/libs/PEAR/docs/HTML_Template_IT/0000755577340101002240000000000010625427764021575 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/HTML_Template_IT/examples/0000755577340101002240000000000010625427761023410 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/HTML_Template_IT/examples/sample_it.php0000644577340101002240000000123010625427760026071 0ustar tonerlogicspg11675700000000000000 array('Stig', 'Bakken'), '1' => array('Martin', 'Jansen'), '2' => array('Alexander', 'Merz') ); $tpl = new HTML_Template_IT('./templates'); $tpl->loadTemplatefile('main.tpl.htm', true, true); foreach ($data as $name) { foreach ($name as $cell) { // Assign data to the inner block $tpl->setCurrentBlock('cell'); $tpl->setVariable('DATA', $cell); $tpl->parseCurrentBlock(); } // Assign data and the inner block to the // outer block $tpl->setCurrentBlock('row'); $tpl->parseCurrentBlock(); } // print the output $tpl->show(); ?> catalog/libs/PEAR/docs/HTML_Template_IT/examples/sample_itx_addblockfile.php0000644577340101002240000000405510625427761030755 0ustar tonerlogicspg11675700000000000000'mypackage', 'version' =>'1.0', 'changelog' => array ('fix bug #002', 'add author FOO to AUTHORS') ), array ('packagename'=>'mypackage', 'version' =>'1.0 RC 1', 'changelog' => array ('fix bug #002', 'added method foo()') ) ); $tpl = new HTML_Template_ITX('./templates'); $tpl->loadTemplatefile('addblockfile_main.tpl.htm', true, true); // The complete content of "addblockfile_main.tpl.htm" will be loaded into a block // called "list_template". The placeholder {DESCRIPTION} will be replaced // with the added block "list_template". $tpl->addBlockfile('DESCRIPTION', 'list_template', 'addblockfile_list.tpl.htm'); // we now have the following blocks loaded: // __global__, row, list_template and listelement // lets assign the data. foreach ($data as $entry) { // assign data to the inner block (listelement) of list_template. $tpl->setCurrentBlock('listelement'); foreach ($entry['changelog'] as $changelogentry) { $tpl->setVariable('ENTRY', $changelogentry); $tpl->parseCurrentBlock(); } // assign data to the added list_template block $tpl->setCurrentBlock('list_template'); $tpl->setVariable('LISTNAME', $entry['version']); $tpl->parseCurrentBlock(); // back in the original templatefile we assign data to the row block // notice: // {DESCRIPTION} is not longer available, because it was replaced by the // list_template block $tpl->setCurrentBlock('row'); $tpl->setVariable('NAME', $entry['packagename']); $tpl->parseCurrentBlock(); } $tpl->show(); ?> catalog/libs/PEAR/docs/HTML_Template_IT/examples/templates/0000755577340101002240000000000010625427764025411 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/HTML_Template_IT/examples/templates/addblockfile_list.tpl.htm0000644577340101002240000000013210625427763032352 0ustar tonerlogicspg11675700000000000000{LISTNAME}
  • {ENTRY}
catalog/libs/PEAR/docs/HTML_Template_IT/examples/templates/addblockfile_main.tpl.htm0000644577340101002240000000022210625427763032323 0ustar tonerlogicspg11675700000000000000
{NAME} {DESCRIPTION}
catalog/libs/PEAR/docs/HTML_Template_IT/examples/templates/main.tpl.htm0000644577340101002240000000023610625427764027646 0ustar tonerlogicspg11675700000000000000
{DATA}
catalog/libs/PEAR/docs/HTML_Template_IT/LICENSE0000644577340101002240000000250710625427765022607 0ustar tonerlogicspg11675700000000000000Redistribution and use in source and binary forms, with or without modification , are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, th is list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/ or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WA RRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABIL ITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR C ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOW EVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILI TY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U SE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. catalog/libs/PEAR/docs/MDB2/0000755577340101002240000000000010625427765017267 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/MDB2/docs/0000755577340101002240000000000010625427775020220 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/MDB2/docs/datatypes.html0000644577340101002240000001740410625427767023113 0ustar tonerlogicspg11675700000000000000 MDB2 data types

MDB2 data types



Introduction

All DBMS provide multiple choice of data types for the information that can be stored in their database table fields. However, the set of data types made available varies from DBMS to DBMS.

To simplify the interface with the DBMS supported by MDB2 it was defined a base set of data types that applications may access independently of the underlying DBMS.

The MDB2 applications programming interface takes care of mapping data types when managing database options. It is also able to convert that is sent to and received from the underlying DBMS using the respective driver.

  • Text data type
  • The text data type is available with two options for the length: one that is explicitly length limited and another of undefined length that should be as large as the database allows.

    The length limited option is the most recommended for efficiency reasons. The undefined length option allows very large fields but may prevent the use of indexes and may not allow sorting on fields of its type.

    The fields of this type should be able to handle 8 bit characters. Drivers take care of DBMS specific escaping of characters of special meaning with the values of the strings to be converted to this type.

  • Boolean data type
  • The boolean data type represents only two values that can be either 1 or 0. Do not assume that these data types are stored as integers because some DBMS drivers may implement this type with single character text fields for a matter of efficient. Ternary logic is possible by using null as the third possible value that may be assigned to fields of this type.

  • Integer data type
  • The integer data type may store integer values as large as each DBMS may handle. Fields of this type may be created optionally as unsigned integers but not all DBMS support it. Therefore, such option may be ignored. Truly portable applications should not rely on the availability of this option.

  • Decimal data type
  • The decimal data type may store decimal numbers accurately with a fixed number of decimal places. This data type is suitable for representing accurate values like currency amounts.

    Some DBMS drivers may emulate the decimal data type using integers. Such drivers need to know in advance how many decimal places that should be used to perform eventual scale conversion when storing and retrieving values from a database. Despite this, applications may use arithmetic expressions and functions with the values stored on decimal type fields as long as any constant values that are used in the expressions are also converted with the respective MDB2 conversion functions.

    The number of places that are used to the left and the right of the decimal point is pre-determined and fixed for all decimal values stored in the same database. By default, MDB2 uses 2 places to the right of the decimal point, but this may be changed when setting the database connection. The number of places available to the right of the decimal point depend on the DBMS.

    It is not recommended to change the number places used to represent decimal values in database after it is installed. MDB2 does not keep track of changes in the number of decimal places.

  • Float data type
  • The float data type may store floating point decimal numbers. This data type is suitable for representing numbers within a large scale range that do not require high accuracy. The scale and the precision limits of the values that may be stored in a database depends on the DBMS that it is used.

  • Date data type
  • The date data type may represent dates with year, month and day. DBMS independent representation of dates is accomplished by using text strings formatted according to the IS0 8601 standard.

    The format defined by the ISO 8601 standard for dates is YYYY-MM-DD where YYYY is the number of the year (Gregorian calendar), MM is the number of the month from 1 to 12 and DD is the number of the day from 1 to 31. Months or days numbered below 10 should be padded on the left with 0.

    Some DBMS have native support for date formats, but for others the DBMS driver may have to represent them as integers or text values. In any case, it is always possible to make comparisons between date values as well sort query results by fields of this type.

  • Time data type
  • The time data type may represent the time of a given moment of the day. DBMS independent representation of the time of the day is also accomplished by using text strings formatted according to the IS0 8601 standard.

    The format defined by the ISO 8601 standard for the time of the day is HH:MI:SS where HH is the number of hour the day from 0 to 23 and MI and SS are respectively the number of the minute and of the second from 0 to 59. Hours, minutes and seconds numbered below 10 should be padded on the left with 0.

    Some DBMS have native support for time of the day formats, but for others the DBMS driver may have to represent them as integers or text values. In any case, it is always possible to make comparisons between time values as well sort query results by fields of this type.

  • Time stamp data type
  • The time stamp data type is a mere combination of the date and the time of the day data types. The representation of values of the time stamp type is accomplished by joining the date and time string values in a single string joined by a space. Therefore, the format template is YYYY-MM-DD HH:MI:SS. The represented values obey the same rules and ranges described for the date and time data types.

  • Large object (file) data types
  • The large object data types are meant to store data of undefined length that may be to large to store in text fields, like data that is usually stored in files.

    MDB2 supports two types of large object fields: Character Large OBjects (CLOBs) and Binary Large OBjects (BLOBs). CLOB fields are meant to store only data made of printable ASCII characters. BLOB fields are meant to store all types of data.

    Large object fields are usually not meant to be used as parameters of query search clause (WHERE) unless the underlying DBMS supports a feature usually known as "full text search".


    Manuel Lemos (mlemos@acm.org)
    catalog/libs/PEAR/docs/MDB2/docs/CONTRIBUTORS0000644577340101002240000000064510625427770022100 0ustar tonerlogicspg11675700000000000000PEAR DB Stig Baekken, Tomas V. Cox Metabase Manuel Lemos PEAR Error integration/XML Schema Parser Christian Dickmann Code Formatting Brent Cook MsSQL/Frontbase Driver Frank Kormann PgSQL Driver Paul Cooper Interbase/Firebird Lorenzo Alberton catalog/libs/PEAR/docs/MDB2/docs/examples/0000755577340101002240000000000010625427773022034 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/MDB2/docs/examples/example.php0000644577340101002240000002202210625427773024176 0ustar tonerlogicspg11675700000000000000PEAR-Error
    '; echo $error_obj->getMessage().': '.$error_obj->getUserinfo(); print ''; } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handle_pear_error'); // just for kicks you can mess up this part to see some pear error handling $user = 'root'; $pass = ''; $host = 'localhost'; $mdb2_name = 'metapear_test_db'; $mdb2_type = !empty($_GET['db_type']) ? $_GET['db_type'] : 'mysql'; echo($mdb2_type.'
    '); // Data Source Name: This is the universal connection string $dsn['username'] = $user; $dsn['password'] = $pass; $dsn['hostspec'] = $host; $dsn['phptype'] = $mdb2_type; // MDB2::factory will return a PEAR::MDB2 instance on success // or a Pear MDB2 error object on error // You can alternatively build a dsn here // $dsn = "$mdb2_type://$user:$pass@$host/$mdb2_name"; Var_Dump($dsn); $mdb2 =& MDB2::factory($dsn); // With PEAR::isError you can differentiate between an error or // a valid connection. if (PEAR::isError($mdb2)) { die (__LINE__.$mdb2->getMessage()); } // this loads the MDB2_Schema manager // this is a separate package you must install require_once 'MDB2/Schema.php'; // you can either pass a dsn string, a dsn array or an exisiting mdb2 connection $schema =& MDB2_Schema::factory($mdb2); $input_file = 'metapear_test_db.schema'; // lets create the database using 'metapear_test_db.schema' // if you have allready run this script you should have 'metapear_test_db.schema.before' // in that case MDB2 will just compare the two schemas and make any // necessary modifications to the existing database Var_Dump($schema->updateDatabase($input_file, $input_file.'.before')); echo('updating database from xml schema file
    '); echo('switching to database: '.$mdb2_name.'
    '); $mdb2->setDatabase($mdb2_name); // happy query $query ='SELECT * FROM test'; echo('query for the following examples:'.$query.'
    '); // run the query and get a result handler $result = $mdb2->query($query); // lets just get row:0 and free the result $array = $result->fetchRow(); $result->free(); echo('
    row:
    '); echo(Var_Dump($array).'
    '); $result = $mdb2->query($query); // lets just get row:0 and free the result $array = $result->fetchRow(MDB2_FETCHMODE_OBJECT); $result->free(); echo('
    row (object:
    '); echo(Var_Dump($array).'
    '); // run the query and get a result handler $result = $mdb2->query($query); // lets just get row:0 and free the result $array = $result->fetchRow(); $result->free(); echo('
    row from object:
    '); echo(Var_Dump($array).'
    '); // run the query and get a result handler $result = $mdb2->query($query); // lets just get column:0 and free the result $array = $result->fetchCol(2); $result->free(); echo('
    get column #2 (counting from 0):
    '); echo(Var_Dump($array).'
    '); // run the query and get a result handler $result = $mdb2->query($query); Var_Dump($mdb2->loadModule('Reverse', null, true)); echo('tableInfo:
    '); echo(Var_Dump($mdb2->reverse->tableInfo($result)).'
    '); $types = array('integer', 'text', 'timestamp'); $result->setResultTypes($types); $array = $result->fetchAll(MDB2_FETCHMODE_FLIPPED); $result->free(); echo('
    all with result set flipped:
    '); echo(Var_Dump($array).'
    '); // save some time with this function // lets just get all and free the result $array = $mdb2->queryAll($query); echo('
    all with just one call:
    '); echo(Var_Dump($array).'
    '); // run the query with the offset 1 and count 1 and get a result handler Var_Dump($mdb2->loadModule('Extended', null, false)); $result = $mdb2->extended->limitQuery($query, null, 1, 1); // lets just get everything but with an associative array and free the result $array = $result->fetchAll(MDB2_FETCHMODE_ASSOC); echo('
    associative array with offset 1 and count 1:
    '); echo(Var_Dump($array).'
    '); // lets create a sequence echo(Var_Dump($mdb2->loadModule('Manager', null, true))); echo('
    create a new seq with start 3 name real_funky_id
    '); $err = $mdb2->manager->createSequence('real_funky_id', 3); if (PEAR::isError($err)) { echo('
    could not create sequence again
    '); } echo('
    get the next id:
    '); $value = $mdb2->nextId('real_funky_id'); echo($value.'
    '); // lets try an prepare execute combo $alldata = array( array(1, 'one', 'un'), array(2, 'two', 'deux'), array(3, 'three', 'trois'), array(4, 'four', 'quatre') ); $stmt = $mdb2->prepare('INSERT INTO numbers VALUES(?,?,?)', array('integer', 'text', 'text'), MDB2_PREPARE_MANIP); foreach ($alldata as $row) { echo('running execute
    '); $stmt->bindValueArray($row); $stmt->execute(); } $array = array(4); echo('
    see getOne in action:
    '); echo(Var_Dump($mdb2->extended->getOne('SELECT trans_en FROM numbers WHERE number = ?',null,$array,array('integer'))).'
    '); $mdb2->setFetchmode(MDB2_FETCHMODE_ASSOC); echo('
    default fetchmode ist now MDB2_FETCHMODE_ASSOC
    '); echo('
    see getRow in action:
    '); echo(Var_Dump($mdb2->extended->getRow('SELECT * FROM numbers WHERE number = ?',array('integer','text','text'),$array, array('integer')))); echo('default fetchmode ist now MDB2_FETCHMODE_ORDERED
    '); $mdb2->setFetchmode(MDB2_FETCHMODE_ORDERED); echo('
    see getCol in action:
    '); echo(Var_Dump($mdb2->extended->getCol('SELECT * FROM numbers WHERE number != ?',null,$array,array('integer'), 1)).'
    '); echo('
    see getAll in action:
    '); echo(Var_Dump($mdb2->extended->getAll('SELECT * FROM test WHERE test_id != ?',array('integer','text','text'), $array, array('integer'))).'
    '); echo('
    see getAssoc in action:
    '); echo(Var_Dump($mdb2->extended->getAssoc('SELECT * FROM test WHERE test_id != ?',array('integer','text','text'), $array, array('integer'), MDB2_FETCHMODE_ASSOC)).'
    '); echo('tableInfo on a string:
    '); echo(Var_Dump($mdb2->reverse->tableInfo('numbers')).'
    '); echo('
    just a simple update query:
    '); echo('
    affected rows:
    '); echo(Var_Dump($mdb2->exec('UPDATE numbers set trans_en ='.$mdb2->quote(0, 'integer'))).'
    '); // subselect test $sub_select = $mdb2->subSelect('SELECT test_name from test WHERE test_name = '.$mdb2->quote('gummihuhn', 'text'), 'text'); echo(Var_Dump($sub_select).'
    '); $query_with_subselect = 'SELECT * FROM test WHERE test_name IN ('.$sub_select.')'; // run the query and get a result handler echo($query_with_subselect.'
    '); $result = $mdb2->query($query_with_subselect); $array = $result->fetchAll(); $result->free(); echo('
    all with subselect:
    '); echo('
    drop index (will fail if the index was never created):
    '); echo(Var_Dump($mdb2->manager->dropIndex('test', 'test_id_index')).'
    '); $index_def = array( 'fields' => array( 'test_id' => array( 'sorting' => 'ascending' ) ) ); echo('
    create index:
    '); echo(Var_Dump($mdb2->manager->createIndex('test', 'test_id_index', $index_def)).'
    '); if ($mdb2_type == 'mysql') { $schema->db->setOption('debug', true); $schema->db->setOption('log_line_break', '
    '); // ok now lets create a new xml schema file from the existing DB $database_definition = $schema->getDefinitionFromDatabase(); // we will not use the 'metapear_test_db.schema' for this // this feature is especially interesting for people that have an existing Db and want to move to MDB2's xml schema management // you can also try MDB2_MANAGER_DUMP_ALL and MDB2_MANAGER_DUMP_CONTENT echo(Var_Dump($schema->dumpDatabase( $database_definition, array( 'output_mode' => 'file', 'output' => $mdb2_name.'2.schema' ), MDB2_SCHEMA_DUMP_STRUCTURE )).'
    '); if ($schema->db->getOption('debug') === true) { echo($schema->db->getDebugOutput().'
    '); } // this is the database definition as an array echo(Var_Dump($database_definition).'
    '); } echo('
    just a simple delete query:
    '); echo(Var_Dump($mdb2->exec('DELETE FROM numbers')).'
    '); // You can disconnect from the database with: $mdb2->disconnect() ?> catalog/libs/PEAR/docs/MDB2/docs/examples/example_php5.php0000644577340101002240000000545310625427773025143 0ustar tonerlogicspg11675700000000000000
     'pgsql',
        'username' => 'postgres',
    #    'phptype'  => 'mysql',
    #    'username' => 'root',
        'password' => 'test',
        'hostspec' => 'localhost',
        'database' => 'driver_test',
    );
    #$dsn = 'sqlite:///:memory:';
    
    // create MDB2 instance
    $mdb2 = MDB2::factory($dsn);
    
    // set the default fetchmode
    $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);
    
    $fields = array(
        'id' => array(
            'type'     => 'integer',
            'unsigned' => true,
            'autoincrement'  => true,
        ),
        'somename' => array(
            'type'     => 'text',
            'length'   => 12,
        ),
        'somedate'  => array(
            'type'     => 'date',
        ),
    );
    $table = 'sometable';
    
    // create a table
    // since we are on php5 we can use the magic __call() method to:
    // - load the manager module: $mdb2->loadModule('Manager', null, true);
    // - redirect the method call to the manager module: $mdb2->manager->createTable('sometable', $fields);
    $mdb2->mgCreateTable($table, $fields);
    
    $query = "INSERT INTO $table (somename, somedate) VALUES (:name, :date)";
    // parameters:
    // 1) the query (notice we are using named parameters, but we could also use ? instead
    // 2) types of the placeholders (either keyed numerically in order or by name)
    // 3) MDB2_PREPARE_MANIP denotes a DML statement
    $stmt = $mdb2->prepare($query, array('text', 'date'), MDB2_PREPARE_MANIP);
    
    // load Date helper class
    MDB2::loadFile('Date');
    
    $stmt->execute(array('name' => 'hello', 'date' => MDB2_Date::mdbToday()));
    // get the last inserted id
    echo 'last insert id: ';
    var_dump($mdb2->lastInsertId($table, 'id'));
    $stmt->execute(array('name' => 'world', 'date' => '2005-11-11'));
    // get the last inserted id
    echo 'last insert id: ';
    var_dump($mdb2->lastInsertId($table, 'id'));
    
    // load Iterator implementations
    MDB2::loadFile('Iterator');
    
    $query = 'SELECT * FROM '.$table;
    // parameters:
    // 1) the query
    // 2) true means MDB2 tries to determine the result set type automatically
    // 3) true is the default and means that internally a MDB2_Result instance should be created
    // 4) 'MDB2_BufferedIterator' means the MDB2_Result should be wrapped inside an SeekableIterator
    $result = $mdb2->query($query, true, true, 'MDB2_BufferedIterator');
    
    // iterate over the result set
    foreach ($result as $row) {
        echo 'output row:
    '; var_dump($row); } // call drop table, since dropTable is not implemented in our instance // but inside the loaded Manager module __call() will find it there and // will redirect the call accordingly // we could also have done: // $mdb2->manager->dropTable($table); or // $mdb2->mgDropTable($table); $mdb2->dropTable($table); ?> catalog/libs/PEAR/docs/MDB2/docs/examples/metapear_test_db.schema0000644577340101002240000000316310625427773026523 0ustar tonerlogicspg11675700000000000000 metapear_test_db 1 numbers number integer 1 0 trans_en text 100 trans_fr text 100
    test test_id integer 1 0 test_name text 30 1 no name test_date timestamp 1 0000-00-00 00:00:00 test_id 1 test_name test0r test_date 2002-02-12 16:33:53 test_id 2 test_name gummihuhn test_date 2001-02-12 16:34:03
    catalog/libs/PEAR/docs/MDB2/docs/MAINTAINERS0000644577340101002240000000072710625427774021722 0ustar tonerlogicspg11675700000000000000Maintainers for MDB2 database backends/drivers: ibase : Lorenzo Alberton mssql : David Coallier mysqli : Lukas Smith oci8 : Lukas Smith pgsql : Lukas Smith fbsql : unmaintained sqlite : Lukas Smith querysim : Lukas Smith catalog/libs/PEAR/docs/MDB2/docs/README0000644577340101002240000001730110625427775021102 0ustar tonerlogicspg11675700000000000000** Introduction: PEAR MDB2 is a project to merge PEAR DB and Metabase into one DB abstraction layer. You can get info on these at: PEAR DB: http://pear.php.net Metabase: http://phpclasses.upperdesign.com/browse.html/package/20/ At these URLs you will also find the licensing information on these two projects along with the credits. Actually MDB2 is the second major version of MDB. The main differences between the new MDB2 and the old MDB version is that the API has been drastically refactored to clean up the API and improve performance. If you have any questions or suggestions you can contact me (Lukas Smith) at this email address: smith@backendmedia.com Co-Author is Christopher Linn: clinn@backendmedia.com Or even better post a message to pear-dev@lists.php.net mailinglist for development related questions of the MDB2 package itself. For questions using MDB2 pelase direct your questions at pear-general@lists.php.net. ** Features MDB2 provides a common API for all support RDBMS. The main difference to most other DB abstraction packages is that MDB2 goes much further to ensure portability. Among other things MDB2 features: * An OO-style query API * A DSN (data source name) or array format for specifying database servers * Datatype abstraction and on demand datatype conversion * Portable error codes * Sequential and non sequential row fetching as well as bulk fetching * Ordered array and associative array for the fetched rows * Buffered and Unbuffered fetching * Prepare/execute (bind) emulation * Sequence emulation * Replace emulation * Limited Subselect emulation * Row limit support * Transactions support * Large Object support * Index/Unique support * Extension Framework to load advanced functionality on demand * Table information interface * RDBMS management methods (creating, dropping, altering) * RDBMS independent xml based schema definition management * Altering of a DB from a changed xml schema * Reverse engineering of xml schemas from an existing DB (currently MySQL and PgSQl) * Full integration into the PEAR Framework * PHPDoc API documentation ** Getting started: I would first recommend taking a look at example.php. This should give you a general feel of how to interact with MDB2. After that you may want to take a look at the rather large API at www.backendmedia.com/MDB2/docs. There you will also find a document describing the xml schema format and a little tutorial (it was just recently ported from Metabase, so it may contain errors). ** Current State: The current release can be found at the PEAR webpage: http://pear.php.net/package-info.php?package=MDB2 ** Package Content: As a user the only php script you will need to include is MDB2.php which will install to your PEAR root directory. All other files and their containing classes will be included via MDB2::factory(), MDB2::connect(), MDB2::singleton(). These will load additional classes. Most classes are loaded on demand. Furthermore MDB2 provides an extensive testing framework that works through a browser and command line interface. There are several other test that test the two wrappers. These files will install into your test dir found in the PEAR root dir. ** Documentation: You can find the still incomplete documentation for MDB2 here: http://pear.php.net/manual/en/package.database.mdb2.php PHPDoc generated documentation can be found at: http://www.backendmedia.com/MDB2/docs/ The entire "public" API and most of the "private" methods (except for some of the lob classes) have been documented with PHPDoc comments. Most of the API is borrowed from extPDO, so you can look there for detailed documentation. Since there are a large number of new methods available thanks to the Metabase heritage of MDB2 you will also have to take a look in the Metabase documentation (which can be found at the URL mentioned above, but does require that you register with phpclasses). Most of these Metabase functions have been renamed and changed considerably. The main things left are the datatypes and the manager module. For example ($db being an MDB2 object): $converted_value = MetabaseGetTimestampFieldValue($database, $value); would now be $converted_value = $db->quote($value, 'timestamp'); If you want to help out with documentation please email me. ** Testing: For most of the tests you can set the username/password/hostname in the relevant config file. The user will need to have the right to create new databases. test.php/clitest.php/testchoose.php: Is the native testing suite provided by MDB2. Please see the README in the tests directory for details. example.php: Several test calls to MDB2's native API. It require PEAR::VAR_Dump package and are configured to use the following settings: username = metapear password = funky hostname = localhost ** How to write new Drivers: Skeleton drivers are provided in the docs directory of the MDB2 package. The best course of action would be to take a MDB2 driver and hack it to fit the new RDBMS. This will surely be faster and it will ensure that the new driver takes full advantage of the MDB2 framework. I would however recommend working with the existing Metabase driver for inspiration that RDBMS when doing those changes. In order to check compliance of the driver with MDB2 you can use the testing suite (see the "testing" section above) ** History MDB was started after Manuel broad be into the discussion about getting the features of Metabase into PEAR that was going on (again) in December 2001. He suggested that I could take on this project. After alot of discussion about how when and if etc I started development in February 2002. MDB is based on Metabase but has been reworked severely to better match the PEAR DB API and PEAR CS. The approach I have taken so far is to take DB.php from PEAR DB and make it create a Metabase object. I have changed the Metabase structure slightly. The formatting has been reworked considerably to better fit the final structure (MDB standalone with a BC-wrapper for Metabase and PEAR DB), to fit the PEAR CS and to make it easier for other people to contribute. The metabase_interface.php was been renamed to metabase_wrapper.php and now only serves as a wrapper to keep BC with Metabase. A wrapper will have to be created for PEAR DB as well. Basically the result is a Metabase that is really close to the PEAR DB structure. I have also added any missing methods from PEAR DB. Work on moving the error handling to PEAR error handling is under way but still needs some work. In MDB2 the API was heavily refactored to be even more streamlined. Redundant features have been removed. Some features where moved out of the core into separate loadable modules. Instead of resources resultsets are now wrapped into objects similar to PEAR DB. ** Credits (never to early for those huh? :-) ): I would especially like to thank Manuel Lemos (Author of Metabase) for getting me involved in this and generally being around to ask questions. I would also like to thank Tomas Cox and Stig S. Bakken from the PEAR projects for help in undertstanding PEAR, solving problems and trusting me enough. Paul Cooper for the work on the pgsql driver. Furthermore I would like to thank Alex Black for being so enthusiastic about this project and offering binarycloud as a test bed for this project. Christian Dickmann for being the first to put MDB to some real use, making MDB use PEAR Error and working on the XML schema manager. Finally Peter Bowyer for starting the discussion that made people pick up this project again after the first versions of what was then called "metapear" have been ideling without much feedback. I guess I should also thank BackendMedia (my company :-) ) for providing the necessary means to develop this on company time (actually for the most part my entire life is company time ... so it goes)catalog/libs/PEAR/docs/MDB2/docs/STATUS0000644577340101002240000000236010625427775021167 0ustar tonerlogicspg11675700000000000000STATUS OF THE PEAR MDB2 PACKAGE ============================= $Id: STATUS,v 1.15 2006/05/03 16:07:41 lsmith Exp $ ------------------------------------------------------------------------ MDB2 Driver Feature Matrix ------------------------ Symbols: x = implemented, but without tests t = implemented, but one or more tests fail T = implemented, passing all tests e = emulated, without tests l = emulated, but one or more tests fail E = emulated, passing all tests n = returns "not capable" - = no implementation of this feature or status unknown fbsql pgsql mysqli sqlite FEATURE ibase | oci8 | mysql | mssql | querysim Test Conformance ---------------- Symbols: o = Test passed X = Test failed L = Some portions of the test failed due to limitations in PHP or DBMS n = Test returns "not capable" - = Not tested fbsql pgsql mysqli sqlite TEST ibase | oci8 | mysql | mssql | querysim DBMS Versions Tested -------------------- fbsql ibase mssql mysql mysqli oci8 pgsql sqlite querysim Tests were performed under both of the following PHP versions unles otherwise noted: catalog/libs/PEAR/docs/MDB2/docs/TODO0000644577340101002240000000007610625427776020714 0ustar tonerlogicspg11675700000000000000see http://oss.backendmedia.com/index.php?area=MDB2&page=ToDo catalog/libs/PEAR/docs/PEAR/0000755577340101002240000000000010625427777017335 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/PEAR/INSTALL0000644577340101002240000000364310625427777020374 0ustar tonerlogicspg11675700000000000000PEAR - The PEAR Installer ========================= Installing the PEAR Installer. You should install PEAR on a local development machine first. Installing PEAR on a remote production machine should only be done after you are familiar with PEAR and have tested code using PEAR on your development machine. There are two methods of installing PEAR - PEAR bundled in PHP - go-pear We will first examine how to install PEAR that is bundled with PHP. Microsoft Windows ================= If you are running PHP 5.2.0 or newer, simply download and run the windows installer (.msi) and PEAR can be automatically installed. Otherwise, for older PHP versions, download the .zip of windows, there is a script included with your PHP distribution that is called "go-pear". You must open a command box in order to run it. Click "start" then click "Run..." and type "cmd.exe" to open a command box. Use "cd" to change directory to the location of PHP where you unzipped it, and run the go-pear command. Unix ==== make sure you have enabled default extensions, and if you want faster downloads, enable the zlib extension. You must also enable the CLI SAPI with the --enable-cli extension directive. After this, simply run: make install-pear and PEAR will be automatically configured for you. go-pear ======= For users who cannot perform the above steps, or who wish to obtain the latest PEAR with a slightly higher risk of failure, use go-pear. go-pear is obtained by downloading http://go-pear.org and saving it as go-pear.php. After downloading, simply run "php go-pear.php" or open it in a web browser (windows only) to download and install PEAR. You can always ask general installation questions on pear-general@lists.php.net, a public mailing list devoted to support for PEAR packages and installation- related issues. Happy PHPing, we hope PEAR will be a great tool for your development work! $Id: INSTALL,v 1.1 2006/09/22 03:31:36 cellog Exp $catalog/libs/PEAR/docs/PEAR/README0000644577340101002240000000225110625430000020162 0ustar tonerlogicspg11675700000000000000PEAR - The PEAR Installer ========================= What is the PEAR Installer? What is PEAR? PEAR is the PHP Extension and Application Repository, found at http://pear.php.net. The PEAR Installer is this software, which contains executable files and PHP code that is used to download and install PEAR code from pear.php.net. PEAR contains useful software libraries and applications such as MDB2 (database abstraction), HTML_QuickForm (HTML forms management), PhpDocumentor (auto-documentation generator), DB_DataObject (Data Access Abstraction), and many hundreds more. Browse all available packages at http://pear.php.net, the list is constantly growing and updating to reflect improvements in the PHP language. DOCUMENTATION ============= Documentation for PEAR can be found at http://pear.php.net/manual/. Installation documentation can be found in the INSTALL file included in this tarball. WARNING: DO NOT RUN PEAR WITHOUT INSTALLING IT - if you downloaded this tarball manually, you MUST install it. Read the instructions in INSTALL prior to use. Happy PHPing, we hope PEAR will be a great tool for your development work! $Id: README,v 1.11 2006/09/22 03:31:36 cellog Exp $catalog/libs/PEAR/docs/PEAR_Frontend_Web/0000755577340101002240000000000010625430001021737 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/PEAR_Frontend_Web/docs/0000755577340101002240000000000010625430002022670 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/PEAR_Frontend_Web/docs/example.php0000644577340101002240000000276610625430003025050 0ustar tonerlogicspg11675700000000000000 */ if (!getenv('PHP_PEAR_SYSCONF_DIR')) { // Use this config instead of the global one if (is_file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pear.conf')) { putenv('PHP_PEAR_SYSCONF_DIR=' . dirname(__FILE__)); } } if ($env=getenv('PHP_PEAR_INSTALL_DIR')) { define("PHP_PEAR_INSTALL_DIR",$env); } else { putenv('PHP_PEAR_INSTALL_DIR=D:\Apache2\htdocs\tshirtshop\libs/PEAR'); } if ($env=getenv('PHP_PEAR_BIN_DIR')) { define("PHP_PEAR_BIN_DIR",$env); } else { putenv('PHP_PEAR_BIN_DIR=D:\Apache2\htdocs\tshirtshop\libs'); } if ($env=getenv('PHP_PEAR_PHP_BIN')) { define("PHP_PEAR_PHP_BIN",$env); } else { putenv('PHP_PEAR_PHP_BIN=c:/php5/php.exe'); } $env=getenv('PHP_PEAR_INSTALL_DIR'); require_once($env.'/PEAR.php'); if (OS_WINDOWS) { $seperator = ';'; } else { $seperator = ':'; }; ini_set('include_path', 'D:\Apache2\htdocs\tshirtshop\libs/PEAR'); $useDHTML = true; // Include WebInstaller require_once("PEAR/WebInstaller.php"); ?> catalog/libs/PEAR/docs/Structures_Graph/0000755577340101002240000000000010625430001022060 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/0000755577340101002240000000000010625430023023014 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/generate.sh0000644577340101002240000000055510625430003025145 0ustar tonerlogicspg11675700000000000000#!/bin/sh (cd ..; tar czf docs/arch.tgz "{arch}") rm -Rf "../{arch}" rm -Rf ./html mkdir -p ./html phpdoc --directory ../Structures,./tutorials --target ./html --title "Structures_Graph Documentation" --output "HTML:frames" --defaultpackagename structures_graph --defaultcategoryname structures --pear (cd ..; tar --absolute-names -xzf docs/arch.tgz) #rm arch.tgz catalog/libs/PEAR/docs/Structures_Graph/docs/html/0000755577340101002240000000000010625430022023757 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/classtrees_Structures_Graph.html0000644577340101002240000000253010625430005032402 0ustar tonerlogicspg11675700000000000000

    Root class Structures_Graph

    Root class Structures_Graph_Manipulator_AcyclicTest

    Root class Structures_Graph_Manipulator_TopologicalSorter

    Root class Structures_Graph_Node

    Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by phpDocumentor 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/html/elementindex.html0000644577340101002240000003640710625430006027342 0ustar tonerlogicspg11675700000000000000

    Full index

    Package indexes


    a c g i m n o r s t u
    a
    addNode
    Add a Node to the Graph
    AcyclicTest.php
    AcyclicTest.php in AcyclicTest.php
    c
    connectsTo
    Test wether this node has an arc to the target node
    connectTo
    Connect this node to another one.
    g
    getData
    Node data getter.
    getGraph
    Node graph getter
    getMetadata
    Node metadata getter
    getNeighbours
    Return nodes connected to this one.
    getNodes
    Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.
    Graph.php
    Graph.php in Graph.php
    i
    inDegree
    Calculate the in degree of the node.
    isAcyclic
    isAcyclic returns true if a graph contains no cycles, false otherwise.
    isDirected
    Return true if a graph is directed
    m
    metadataKeyExists
    Test for existence of metadata under a given key.
    n
    Node.php
    Node.php in Node.php
    o
    outDegree
    Calculate the out degree of the node.
    r
    removeNode
    Remove a Node from the Graph
    s
    setData
    Node data setter
    setGraph
    Node graph setter. This method should not be called directly. Use Graph::addNode instead.
    setMetadata
    Node metadata setter
    sort
    sort returns the graph's nodes, sorted by topological order.
    Structures_Graph
    Structures_Graph in Graph.php
    The Structures_Graph class represents a graph data structure.
    Structures_Graph
    Constructor
    STRUCTURES_GRAPH_ERROR_GENERIC
    Structures_Graph_Manipulator_AcyclicTest
    The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.
    Structures_Graph_Manipulator_TopologicalSorter
    The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.
    Structures_Graph_Node
    Constructor
    Structures_Graph_Node
    The Structures_Graph_Node class represents a Node that can be member of a graph node set.
    t
    TopologicalSorter.php
    TopologicalSorter.php in TopologicalSorter.php
    u
    unsetMetadata
    Delete metadata by key
    a c g i m n o r s t u
    catalog/libs/PEAR/docs/Structures_Graph/docs/html/elementindex_Structures_Graph.html0000644577340101002240000003712010625430007032720 0ustar tonerlogicspg11675700000000000000

    [Structures_Graph] element index

    All elements
    a c g i m n o r s t u
    a
    addNode
    Add a Node to the Graph
    AcyclicTest.php
    AcyclicTest.php in AcyclicTest.php
    c
    connectsTo
    Test wether this node has an arc to the target node
    connectTo
    Connect this node to another one.
    g
    getData
    Node data getter.
    getGraph
    Node graph getter
    getMetadata
    Node metadata getter
    getNeighbours
    Return nodes connected to this one.
    getNodes
    Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.
    Graph.php
    Graph.php in Graph.php
    i
    inDegree
    Calculate the in degree of the node.
    isAcyclic
    isAcyclic returns true if a graph contains no cycles, false otherwise.
    isDirected
    Return true if a graph is directed
    m
    metadataKeyExists
    Test for existence of metadata under a given key.
    n
    Node.php
    Node.php in Node.php
    o
    outDegree
    Calculate the out degree of the node.
    r
    removeNode
    Remove a Node from the Graph
    s
    setData
    Node data setter
    setGraph
    Node graph setter. This method should not be called directly. Use Graph::addNode instead.
    setMetadata
    Node metadata setter
    sort
    sort returns the graph's nodes, sorted by topological order.
    Structures_Graph
    Structures_Graph in Graph.php
    The Structures_Graph class represents a graph data structure.
    Structures_Graph
    Constructor
    STRUCTURES_GRAPH_ERROR_GENERIC
    Structures_Graph_Manipulator_AcyclicTest
    The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.
    Structures_Graph_Manipulator_TopologicalSorter
    The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.
    Structures_Graph_Node
    Constructor
    Structures_Graph_Node
    The Structures_Graph_Node class represents a Node that can be member of a graph node set.
    t
    TopologicalSorter.php
    TopologicalSorter.php in TopologicalSorter.php
    u
    unsetMetadata
    Delete metadata by key
    a c g i m n o r s t u
    catalog/libs/PEAR/docs/Structures_Graph/docs/html/errors.html0000644577340101002240000000132510625430007026165 0ustar tonerlogicspg11675700000000000000 phpDocumentor Parser Errors and Warnings Post-parsing

    Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by phpDocumentor 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/html/index.html0000644577340101002240000000176110625430010025756 0ustar tonerlogicspg11675700000000000000 Structures_Graph Documentation <H2>Frame Alert</H2> <P>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.</P> catalog/libs/PEAR/docs/Structures_Graph/docs/html/li_Structures_Graph.html0000644577340101002240000000476010625430010030641 0ustar tonerlogicspg11675700000000000000
    Structures_Graph

    phpDocumentor v 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/html/media/0000755577340101002240000000000010625430012025035 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/media/banner.css0000644577340101002240000000061110625430012027012 0ustar tonerlogicspg11675700000000000000body { background-color: #CCCCFF; margin: 0px; padding: 0px; } /* Banner (top bar) classes */ .banner { } .banner-menu { clear: both; padding: .5em; border-top: 2px solid #6666AA; } .banner-title { text-align: right; font-size: 20pt; font-weight: bold; margin: .2em; } .package-selector { background-color: #AAAADD; border: 1px solid black; color: yellow; } catalog/libs/PEAR/docs/Structures_Graph/docs/html/media/stylesheet.css0000644577340101002240000001160410625430013027743 0ustar tonerlogicspg11675700000000000000a { color: #336699; text-decoration: none; } a:hover { color: #6699CC; text-decoration: underline; } a:active { color: #6699CC; text-decoration: underline; } body { background : #FFFFFF; } body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt } p, li { line-height: 140% } a img { border: 0px; } dd { margin-left: 0px; padding-left: 1em; } /* Page layout/boxes */ .info-box {} .info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF } .info-box-body { border: 1px solid #999999; padding: .5em; } .nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } .oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} .evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} .page-body { max-width: 800px; margin: auto; } .tree dl { margin: 0px } /* Index formatting classes */ .index-item-body { margin-top: .5em; margin-bottom: .5em} .index-item-description { margin-top: .25em } .index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } .index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} .index-letter-title { font-size: 12pt; font-weight: bold } .index-letter-menu { text-align: center; margin: 1em } .index-letter { font-size: 12pt } /* Docbook classes */ .description {} .short-description { font-weight: bold; color: #666666; } .tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } .parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; } .redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } .package { } .package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } .package-details { font-size: 85%; } .sub-package { font-weight: bold; font-size: 120% } .tutorial { border-width: thin; border-color: #0066ff } .tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; } .nav-button-disabled { color: #999999; } .nav-button:active, .nav-button:focus, .nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none } .folder-title { font-style: italic } /* Generic formatting */ .field { font-weight: bold; } .detail { font-size: 8pt; } .notes { font-style: italic; font-size: 8pt; } .separator { background-color: #999999; height: 2px; } .warning { color: #FF6600; } .disabled { font-style: italic; color: #999999; } /* Code elements */ .line-number { } .class-table { width: 100%; } .class-table-header { border-bottom: 1px dotted #666666; text-align: left} .class-name { color: #000000; font-weight: bold; } .method-summary { padding-left: 1em; font-size: 8pt } .method-header { } .method-definition { margin-bottom: .3em } .method-title { font-weight: bold; } .method-name { font-weight: bold; } .method-signature { font-size: 85%; color: #666666; margin: .5em 0em } .method-result { font-style: italic; } .var-summary { padding-left: 1em; font-size: 8pt; } .var-header { } .var-title { margin-bottom: .3em } .var-type { font-style: italic; } .var-name { font-weight: bold; } .var-default {} .var-description { font-weight: normal; color: #000000; } .include-title { } .include-type { font-style: italic; } .include-name { font-weight: bold; } .const-title { } .const-name { font-weight: bold; } /* Syntax highlighting */ .src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; } .src-comm { color: green; } .src-id { } .src-inc { color: #0000FF; } .src-key { color: #0000FF; } .src-num { color: #CC0000; } .src-str { color: #66cccc; } .src-sym { font-weight: bold; } .src-var { } .src-php { font-weight: bold; } .src-doc { color: #009999 } .src-doc-close-template { color: #0000FF } .src-doc-coretag { color: #0099FF; font-weight: bold } .src-doc-inlinetag { color: #0099FF } .src-doc-internal { color: #6699cc } .src-doc-tag { color: #0080CC } .src-doc-template { color: #0000FF } .src-doc-type { font-style: italic } .src-doc-var { font-style: italic } /* tutorial */ .authors { } .author { font-style: italic; font-weight: bold } .author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } .example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em } .listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap } .release-info { font-size: 85%; font-style: italic; margin: 1em 0em } .ref-title-box { } .ref-title { } .ref-purpose { font-style: italic; color: #666666 } .ref-synopsis { } .title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF } .cmd-synopsis { margin: 1em 0em } .cmd-title { font-weight: bold } .toc { margin-left: 2em; padding-left: 0em } catalog/libs/PEAR/docs/Structures_Graph/docs/html/packages.html0000644577340101002240000000164110625430013026425 0ustar tonerlogicspg11675700000000000000 catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/0000755577340101002240000000000010625430021027262 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph.html0000644577340101002240000002127310625430016033465 0ustar tonerlogicspg11675700000000000000 Docs For Class Structures_Graph

    Class Structures_Graph

    Description

    The Structures_Graph class represents a graph data structure.

    A Graph is a data structure composed by a set of nodes, connected by arcs. Graphs may either be directed or undirected. In a directed graph, arcs are directional, and can be traveled only one way. In an undirected graph, arcs are bidirectional, and can be traveled both ways.

    Located in /Structures/Graph.php (line 56)

    
    	
    			
    Method Summary
    Structures_Graph Structures_Graph ([boolean $directed = true])
    void addNode (Structures_Graph_Node &$newNode)
    array &getNodes ()
    boolean isDirected ()
    Methods
    Constructor Structures_Graph (line 76)

    Constructor

    • access: public
    Structures_Graph Structures_Graph ([boolean $directed = true])
    • boolean $directed: Set to true if the graph is directed. Set to false if it is not directed. (Optional, defaults to true)
    addNode (line 102)

    Add a Node to the Graph

    • access: public
    void addNode (Structures_Graph_Node &$newNode)
    getNodes (line 151)

    Return the node set, in no particular order. For ordered node sets, use a Graph Manipulator insted.

    array &getNodes ()
    isDirected (line 89)

    Return true if a graph is directed

    • return: true if the graph is directed
    • access: public
    boolean isDirected ()
    removeNode (line 138)

    Remove a Node from the Graph

    • access: public
    • todo: This is unimplemented
    void removeNode (Structures_Graph_Node &$node)

    Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by phpDocumentor 1.2.3

    ././@LongLink0000644577340101002240000000016111123613577011342 Lustar 00000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.htmlcatalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_Acyc0000644577340101002240000000741010625430016036031 0ustar tonerlogicspg11675700000000000000 Docs For Class Structures_Graph_Manipulator_AcyclicTest

    Class Structures_Graph_Manipulator_AcyclicTest

    Description

    The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.

    The definition of an acyclic graph used in this manipulator is that of a DAG. The graph must be directed, or else it is considered cyclic, even when there are no arcs.

    Located in /Structures/Graph/Manipulator/AcyclicTest.php (line 55)

    
    	
    			
    Method Summary
    boolean isAcyclic (mixed &$graph)
    Methods
    isAcyclic (line 126)

    isAcyclic returns true if a graph contains no cycles, false otherwise.

    • return: true iff graph is acyclic
    • access: public
    boolean isAcyclic (mixed &$graph)

    Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by phpDocumentor 1.2.3

    ././@LongLink0000644577340101002240000000016711123613577011350 Lustar 00000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.htmlcatalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_Topo0000644577340101002240000001014110625430017036067 0ustar tonerlogicspg11675700000000000000 Docs For Class Structures_Graph_Manipulator_TopologicalSorter

    Class Structures_Graph_Manipulator_TopologicalSorter

    Description

    The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.

    A graph may only be sorted topologically iff it's a DAG. You can test it with the Structures_Graph_Manipulator_AcyclicTest.

    Located in /Structures/Graph/Manipulator/TopologicalSorter.php (line 58)

    
    	
    			
    Method Summary
    array sort (mixed &$graph)
    Methods
    sort (line 133)

    sort returns the graph's nodes, sorted by topological order.

    The result is an array with as many entries as topological levels. Each entry in this array is an array of nodes within the given topological level.

    • return: The graph's nodes, sorted by topological order.
    • access: public
    array sort (mixed &$graph)

    Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by phpDocumentor 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Node.html0000644577340101002240000005007110625430017034431 0ustar tonerlogicspg11675700000000000000 Docs For Class Structures_Graph_Node

    Class Structures_Graph_Node

    Description

    The Structures_Graph_Node class represents a Node that can be member of a graph node set.

    A graph node can contain data. Under this API, the node contains default data, and key index data. It behaves, thus, both as a regular data node, and as a dictionary (or associative array) node.

    Regular data is accessed via getData and setData. Key indexed data is accessed via getMetadata and setMetadata.

    Located in /Structures/Graph/Node.php (line 57)

    
    	
    			
    Method Summary
    Structures_Graph_Node Structures_Graph_Node ()
    boolean connectsTo (mixed &$target)
    void connectTo (Structures_Graph &$destinationNode)
    mixed &getData ()
    mixed &getMetadata (string $key, [boolean $nullIfNonexistent = false])
    array getNeighbours ()
    integer inDegree ()
    boolean metadataKeyExists (string $key)
    integer outDegree ()
    mixed setData (mixed $data)
    void setGraph (Structures_Graph &$graph)
    void setMetadata (string $key, mixed $data)
    void unsetMetadata (string $key)
    Methods
    Constructor Structures_Graph_Node (line 78)

    Constructor

    • access: public
    Structures_Graph_Node Structures_Graph_Node ()
    connectsTo (line 275)

    Test wether this node has an arc to the target node

    • return: True if the two nodes are connected
    • access: public
    boolean connectsTo (mixed &$target)
    connectTo (line 236)

    Connect this node to another one.

    If the graph is not directed, the reverse arc, connecting $destinationNode to $this is also created.

    • access: public
    void connectTo (Structures_Graph &$destinationNode)
    getData (line 119)

    Node data getter.

    Each graph node can contain a reference to one variable. This is the getter for that reference.

    • return: Data stored in node
    • access: public
    mixed &getData ()
    getGraph (line 90)

    Node graph getter

    • return: Graph where node is stored
    • access: public
    Structures_Graph &getGraph ()
    getMetadata (line 171)

    Node metadata getter

    Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method gets the data under the given key. If the key does not exist, an error will be thrown, so testing using metadataKeyExists might be needed.

    mixed &getMetadata (string $key, [boolean $nullIfNonexistent = false])
    • string $key: Key
    • boolean $nullIfNonexistent: nullIfNonexistent (defaults to false).
    getNeighbours (line 262)

    Return nodes connected to this one.

    • return: Array of nodes
    • access: public
    array getNeighbours ()
    inDegree (line 309)

    Calculate the in degree of the node.

    The indegree for a node is the number of arcs entering the node. For non directed graphs, the indegree is equal to the outdegree.

    • return: In degree of the node
    • access: public
    integer inDegree ()
    metadataKeyExists (line 151)

    Test for existence of metadata under a given key.

    Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method tests whether a given metadata key exists for this node.

    • access: public
    boolean metadataKeyExists (string $key)
    • string $key: Key to test
    outDegree (line 333)

    Calculate the out degree of the node.

    The outdegree for a node is the number of arcs exiting the node. For non directed graphs, the outdegree is always equal to the indegree.

    • return: Out degree of the node
    • access: public
    integer outDegree ()
    setData (line 134)

    Node data setter

    Each graph node can contain a reference to one variable. This is the setter for that reference.

    • return: Data to store in node
    • access: public
    mixed setData (mixed $data)
    setGraph (line 104)

    Node graph setter. This method should not be called directly. Use Graph::addNode instead.

    void setGraph (Structures_Graph &$graph)
    setMetadata (line 214)

    Node metadata setter

    Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method stores data under the given key. If the key already exists, previously stored data is discarded.

    • access: public
    void setMetadata (string $key, mixed $data)
    • string $key: Key
    • mixed $data: Data
    unsetMetadata (line 196)

    Delete metadata by key

    Each graph node can contain multiple 'metadata' entries, each stored under a different key, as in an associative array or in a dictionary. This method removes any data that might be stored under the provided key. If the key does not exist, no error is thrown, so it is safe using this method without testing for key existence.

    • access: public
    void unsetMetadata (string $key)
    • string $key: Key

    Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by phpDocumentor 1.2.3

    ././@LongLink0000644577340101002240000000014611123613577011345 Lustar 00000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.htmlcatalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.htm0000644577340101002240000001110610625430020036001 0ustar tonerlogicspg11675700000000000000 Structures_Graph Tutorial

    Structures_Graph Tutorial

    A first tour of graph datastructure manipulation

    Introduction

    Structures_Graph is a package for creating and manipulating graph datastructures. A graph is a set of objects, called nodes, connected by arcs. When used as a datastructure, usually nodes contain data, and arcs represent relationships between nodes. When arcs have a direction, and can be travelled only one way, graphs are said to be directed. When arcs have no direction, and can always be travelled both ways, graphs are said to be non directed.

    Structures_Graph provides an object oriented API to create and directly query a graph, as well as a set of Manipulator classes to extract information from the graph.

    Creating a Graph

    Creating a graph is done using the simple constructor:

    require_once 'Structures/Graph.php';
    
    $directedGraph =& new Structures_Graph(true);
    $nonDirectedGraph =& new Structures_Graph(false);
        
    and passing the constructor a flag telling it whether the graph should be directed. A directed graph will always be directed during its lifetime. It's a permanent characteristic.

    To fill out the graph, we'll need to create some nodes, and then call Graph::addNode.

    require_once 'Structures/Graph/Node.php';
    
    $nodeOne =& new Structures_Graph_Node();
    $nodeTwo =& new Structures_Graph_Node();
    $nodeThree =& new Structures_Graph_Node();
    
    $directedGraph->addNode(&$nodeOne);
    $directedGraph->addNode(&$nodeTwo);
    $directedGraph->addNode(&$nodeThree);
        
    and then setup the arcs:
    $nodeOne->connectTo($nodeTwo);
    $nodeOne->connectTo($nodeThree);
        
    Note that arcs can only be created after the nodes have been inserted into the graph.

    Associating Data

    Graphs are only useful as datastructures if they can hold data. Structure_Graph stores data in nodes. Each node contains a setter and a getter for its data.

    $nodeOne->setData("Node One's Data is a String");
    $nodeTwo->setData(1976);
    $nodeThree->setData('Some other string');
    
    print("NodeTwo's Data is an integer: " . $nodeTwo->getData());
        

    Structure_Graph nodes can also store metadata, alongside with the main data. Metadata differs from regular data just because it is stored under a key, making it possible to store more than one data reference per node. The metadata getter and setter need the key to perform the operation:

    $nodeOne->setMetadata('example key', "Node One's Sample Metadata");
    print("Metadata stored under key 'example key' in node one: " . $nodeOne->getMetadata('example key'));
    $nodeOne->unsetMetadata('example key');
        

    Querying a Graph

    Structures_Graph provides for basic querying of the graph:

    // Nodes are able to calculate their indegree and outdegree
    print("NodeOne's inDegree: " . $nodeOne->inDegree());
    print("NodeOne's outDegree: " . $nodeOne->outDegree());
    
    // and naturally, nodes can report on their arcs
    $arcs = $nodeOne->getNeighbours();
    for ($i=0;$i<sizeof($arcs);$i++) {
        print("NodeOne has an arc to " . $arcs[$i]->getData());
    }
        

    Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by phpDocumentor 1.2.3

    ././@LongLink0000644577340101002240000000016611123613577011347 Lustar 00000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.htmlcatalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_Acy0000644577340101002240000000746210625430020036027 0ustar tonerlogicspg11675700000000000000 Docs for page AcyclicTest.php

    /Structures/Graph/Manipulator/AcyclicTest.php

    Description

    This file contains the definition of the Structures_Graph_Manipulator_AcyclicTest graph manipulator.

    Classes
    Class Description
    Structures_Graph_Manipulator_AcyclicTest The Structures_Graph_Manipulator_AcyclicTest is a graph manipulator which tests whether a graph contains a cycle.
    Includes
    require_once ('PEAR.php') (line 35)
    require_once ('Structures/Graph.php') (line 37)
    require_once ('Structures/Graph/Node.php') (line 39)

    Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by phpDocumentor 1.2.3

    ././@LongLink0000644577340101002240000000017411123613577011346 Lustar 00000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.htmlcatalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_Top0000644577340101002240000001052510625430021036050 0ustar tonerlogicspg11675700000000000000 Docs for page TopologicalSorter.php

    /Structures/Graph/Manipulator/TopologicalSorter.php

    Description

    This file contains the definition of the Structures_Graph_Manipulator_TopologicalSorter class.

    Classes
    Class Description
    Structures_Graph_Manipulator_TopologicalSorter The Structures_Graph_Manipulator_TopologicalSorter is a manipulator which is able to return the set of nodes in a graph, sorted by topological order.
    Includes
    require_once ('PEAR.php') (line 35)
    require_once ('Structures/Graph.php') (line 37)
    require_once ('Structures/Graph/Node.php') (line 39)

    Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by phpDocumentor 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Node_php.html0000644577340101002240000000635610625430021035441 0ustar tonerlogicspg11675700000000000000 Docs for page Node.php

    /Structures/Graph/Node.php

    Description

    This file contains the definition of the Structures_Graph_Node class

    Classes
    Class Description
    Structures_Graph_Node The Structures_Graph_Node class represents a Node that can be member of a graph node set.
    Includes
    require_once ('PEAR.php') (line 35)
    require_once ('Structures/Graph.php') (line 37)

    Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by phpDocumentor 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_php.html0000644577340101002240000001020710625430022034463 0ustar tonerlogicspg11675700000000000000 Docs for page Graph.php

    /Structures/Graph.php

    Description

    The Graph.php file contains the definition of the Structures_Graph class

    Classes
    Class Description
    Structures_Graph The Structures_Graph class represents a graph data structure.
    Includes
    require_once ('Structures/Graph/Node.php') (line 37)

    Graph Node

    require_once ('PEAR.php') (line 35)

    PEAR base classes

    Constants
    STRUCTURES_GRAPH_ERROR_GENERIC = 100 (line 40)

    Documentation generated on Fri, 30 Jan 2004 16:37:28 +0000 by phpDocumentor 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/html/todolist.html0000644577340101002240000000155410625430022026513 0ustar tonerlogicspg11675700000000000000 Todo List

    Todo List

    Structures_Graph

    Structures_Graph::removeNode()

    • This is unimplemented

    Documentation generated on Fri, 30 Jan 2004 16:37:29 +0000 by phpDocumentor 1.2.3

    catalog/libs/PEAR/docs/Structures_Graph/docs/tutorials/0000755577340101002240000000000010625430023025042 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/tutorials/Structures_Graph/0000755577340101002240000000000010625430025030350 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/docs/Structures_Graph/docs/tutorials/Structures_Graph/Structures_Graph.pkg0000644577340101002240000000771410625430025034370 0ustar tonerlogicspg11675700000000000000 Structures_Graph Tutorial A first tour of graph datastructure manipulation Introduction Structures_Graph is a package for creating and manipulating graph datastructures. A graph is a set of objects, called nodes, connected by arcs. When used as a datastructure, usually nodes contain data, and arcs represent relationships between nodes. When arcs have a direction, and can be travelled only one way, graphs are said to be directed. When arcs have no direction, and can always be travelled both ways, graphs are said to be non directed. Structures_Graph provides an object oriented API to create and directly query a graph, as well as a set of Manipulator classes to extract information from the graph. Creating a Graph Creating a graph is done using the simple constructor: and passing the constructor a flag telling it whether the graph should be directed. A directed graph will always be directed during its lifetime. It's a permanent characteristic. To fill out the graph, we'll need to create some nodes, and then call Graph::addNode. addNode(&$nodeOne); $directedGraph->addNode(&$nodeTwo); $directedGraph->addNode(&$nodeThree); ]]> and then setup the arcs: connectTo($nodeTwo); $nodeOne->connectTo($nodeThree); ]]> Note that arcs can only be created after the nodes have been inserted into the graph. Associating Data Graphs are only useful as datastructures if they can hold data. Structure_Graph stores data in nodes. Each node contains a setter and a getter for its data. setData("Node One's Data is a String"); $nodeTwo->setData(1976); $nodeThree->setData('Some other string'); print("NodeTwo's Data is an integer: " . $nodeTwo->getData()); ]]> Structure_Graph nodes can also store metadata, alongside with the main data. Metadata differs from regular data just because it is stored under a key, making it possible to store more than one data reference per node. The metadata getter and setter need the key to perform the operation: setMetadata('example key', "Node One's Sample Metadata"); print("Metadata stored under key 'example key' in node one: " . $nodeOne->getMetadata('example key')); $nodeOne->unsetMetadata('example key'); ]]> Querying a Graph Structures_Graph provides for basic querying of the graph: inDegree()); print("NodeOne's outDegree: " . $nodeOne->outDegree()); // and naturally, nodes can report on their arcs $arcs = $nodeOne->getNeighbours(); for ($i=0;$igetData()); } ]]> catalog/libs/PEAR/HTML/0000755577340101002240000000000010625430024016375 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/HTML/Template/0000755577340101002240000000000010625430027020153 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/HTML/Template/IT.php0000644577340101002240000007606510625430026021215 0ustar tonerlogicspg11675700000000000000 | // | Pierre-Alain Joye | // +----------------------------------------------------------------------+ // // $Id: IT.php,v 1.20 2006/08/17 15:47:22 dsp Exp $ // require_once 'PEAR.php'; define('IT_OK', 1); define('IT_ERROR', -1); define('IT_TPL_NOT_FOUND', -2); define('IT_BLOCK_NOT_FOUND', -3); define('IT_BLOCK_DUPLICATE', -4); define('IT_UNKNOWN_OPTION', -6); /** * Integrated Template - IT * * Well there's not much to say about it. I needed a template class that * supports a single template file with multiple (nested) blocks inside and * a simple block API. * * The Isotemplate API is somewhat tricky for a beginner although it is the best * one you can build. template::parse() [phplib template = Isotemplate] requests * you to name a source and a target where the current block gets parsed into. * Source and target can be block names or even handler names. This API gives you * a maximum of fexibility but you always have to know what you do which is * quite unusual for php skripter like me. * * I noticed that I do not any control on which block gets parsed into which one. * If all blocks are within one file, the script knows how they are nested and in * which way you have to parse them. IT knows that inner1 is a child of block2, there's * no need to tell him about this. * * * * * * * * * *
    * __global__ *

    * (hidden and automatically added) *

    block1 * * * * * * * * *
    block2
    inner1inner2
    *
    * * To add content to block1 you simply type: * $tpl->setCurrentBlock("block1"); * and repeat this as often as needed: * * $tpl->setVariable(...); * $tpl->parseCurrentBlock(); * * * To add content to block2 you would type something like: * * $tpl->setCurrentBlock("inner1"); * $tpl->setVariable(...); * $tpl->parseCurrentBlock(); * * $tpl->setVariable(...); * $tpl->parseCurrentBlock(); * * $tpl->parse("block1"); * * * This will result in one repition of block1 which contains two repitions * of inner1. inner2 will be removed if $removeEmptyBlock is set to true which is the default. * * Usage: * * $tpl = new HTML_Template_IT( [string filerootdir] ); * * // load a template or set it with setTemplate() * $tpl->loadTemplatefile( string filename [, boolean removeUnknownVariables, boolean removeEmptyBlocks] ) * * // set "global" Variables meaning variables not beeing within a (inner) block * $tpl->setVariable( string variablename, mixed value ); * * // like with the Isotemplates there's a second way to use setVariable() * $tpl->setVariable( array ( string varname => mixed value ) ); * * // Let's use any block, even a deeply nested one * $tpl->setCurrentBlock( string blockname ); * * // repeat this as often as you need it. * $tpl->setVariable( array ( string varname => mixed value ) ); * $tpl->parseCurrentBlock(); * * // get the parsed template or print it: $tpl->show() * $tpl->get(); * * * @author Ulf Wendel * @version $Id: IT.php,v 1.20 2006/08/17 15:47:22 dsp Exp $ * @access public * @package HTML_Template_IT */ class HTML_Template_IT { /** * Contains the error objects * @var array * @access public * @see halt(), $printError, $haltOnError */ var $err = array(); /** * Clear cache on get()? * @var boolean */ var $clearCache = false; /** * First character of a variable placeholder ( _{_VARIABLE} ). * @var string * @access public * @see $closingDelimiter, $blocknameRegExp, $variablenameRegExp */ var $openingDelimiter = '{'; /** * Last character of a variable placeholder ( {VARIABLE_}_ ). * @var string * @access public * @see $openingDelimiter, $blocknameRegExp, $variablenameRegExp */ var $closingDelimiter = '}'; /** * RegExp matching a block in the template. * Per default "sm" is used as the regexp modifier, "i" is missing. * That means a case sensitive search is done. * @var string * @access public * @see $variablenameRegExp, $openingDelimiter, $closingDelimiter */ var $blocknameRegExp = '[\.0-9A-Za-z_-]+'; /** * RegExp matching a variable placeholder in the template. * Per default "sm" is used as the regexp modifier, "i" is missing. * That means a case sensitive search is done. * @var string * @access public * @see $blocknameRegExp, $openingDelimiter, $closingDelimiter */ var $variablenameRegExp = '[\.0-9A-Za-z_-]+'; /** * RegExp used to find variable placeholder, filled by the constructor. * @var string Looks somewhat like @(delimiter varname delimiter)@ * @access public * @see IntegratedTemplate() */ var $variablesRegExp = ''; /** * RegExp used to strip unused variable placeholder. * @brother $variablesRegExp */ var $removeVariablesRegExp = ''; /** * Controls the handling of unknown variables, default is remove. * @var boolean * @access public */ var $removeUnknownVariables = true; /** * Controls the handling of empty blocks, default is remove. * @var boolean * @access public */ var $removeEmptyBlocks = true; /** * RegExp used to find blocks an their content, filled by the constructor. * @var string * @see IntegratedTemplate() */ var $blockRegExp = ''; /** * Name of the current block. * @var string */ var $currentBlock = '__global__'; /** * Content of the template. * @var string */ var $template = ''; /** * Array of all blocks and their content. * * @var array * @see findBlocks() */ var $blocklist = array(); /** * Array with the parsed content of a block. * * @var array */ var $blockdata = array(); /** * Array of variables in a block. * @var array */ var $blockvariables = array(); /** * Array of inner blocks of a block. * @var array */ var $blockinner = array(); /** * List of blocks to preverse even if they are "empty". * * This is something special. Sometimes you have blocks that * should be preserved although they are empty (no placeholder replaced). * Think of a shopping basket. If it's empty you have to drop a message to * the user. If it's filled you have to show the contents of * the shopping baseket. Now where do you place the message that the basket * is empty? It's no good idea to place it in you applications as customers * tend to like unecessary minor text changes. Having another template file * for an empty basket means that it's very likely that one fine day * the filled and empty basket templates have different layout. I decided * to introduce blocks that to not contain any placeholder but only * text such as the message "Your shopping basked is empty". * * Now if there is no replacement done in such a block the block will * be recognized as "empty" and by default ($removeEmptyBlocks = true) be * stripped off. To avoid thisyou can now call touchBlock() to avoid this. * * The array $touchedBlocks stores a list of touched block which must not * be removed even if they are empty. * * @var array $touchedBlocks * @see touchBlock(), $removeEmptyBlocks */ var $touchedBlocks = array(); /** * List of blocks which should not be shown even if not "empty" * @var array $_hiddenBlocks * @see hideBlock(), $removeEmptyBlocks */ var $_hiddenBlocks = array(); /** * Variable cache. * * Variables get cached before any replacement is done. * Advantage: empty blocks can be removed automatically. * Disadvantage: might take some more memory * * @var array * @see setVariable(), $clearCacheOnParse */ var $variableCache = array(); /** * Clear the variable cache on parse? * * If you're not an expert just leave the default false. * True reduces memory consumption somewhat if you tend to * add lots of values for unknown placeholder. * * @var boolean */ var $clearCacheOnParse = false; /** * Root directory for all file operations. * The string gets prefixed to all filenames given. * @var string * @see HTML_Template_IT(), setRoot() */ var $fileRoot = ''; /** * Internal flag indicating that a blockname was used multiple times. * @var boolean */ var $flagBlocktrouble = false; /** * Flag indicating that the global block was parsed. * @var boolean */ var $flagGlobalParsed = false; /** * EXPERIMENTAL! FIXME! * Flag indication that a template gets cached. * * Complex templates require some times to be preparsed * before the replacement can take place. Often I use * one template file over and over again but I don't know * before that I will use the same template file again. * Now IT could notice this and skip the preparse. * * @var boolean */ var $flagCacheTemplatefile = true; /** * EXPERIMENTAL! FIXME! */ var $lastTemplatefile = ''; /** * $_options['preserve_data'] Whether to substitute variables and remove * empty placeholders in data passed through setVariable * (see also bugs #20199, #21951). * $_options['use_preg'] Whether to use preg_replace instead of * str_replace in parse() * (this is a backwards compatibility feature, see also bugs #21951, #20392) */ var $_options = array( 'preserve_data' => false, 'use_preg' => true ); /** * Builds some complex regular expressions and optinally sets the * file root directory. * * Make sure that you call this constructor if you derive your template * class from this one. * * @param string File root directory, prefix for all filenames * given to the object. * @see setRoot() */ function HTML_Template_IT($root = '', $options = null) { if (!is_null($options)) { $this->setOptions($options); } $this->variablesRegExp = '@' . $this->openingDelimiter . '(' . $this->variablenameRegExp . ')' . $this->closingDelimiter . '@sm'; $this->removeVariablesRegExp = '@' . $this->openingDelimiter . "\s*(" . $this->variablenameRegExp . ")\s*" . $this->closingDelimiter .'@sm'; $this->blockRegExp = '@(.*)@sm'; $this->setRoot($root); } // end constructor /** * Sets the option for the template class * * @access public * @param string option name * @param mixed option value * @return mixed IT_OK on success, error object on failure */ function setOption($option, $value) { if (array_key_exists($option, $this->_options)) { $this->_options[$option] = $value; return IT_OK; } return PEAR::raiseError( $this->errorMessage(IT_UNKNOWN_OPTION) . ": '{$option}'", IT_UNKNOWN_OPTION ); } /** * Sets the options for the template class * * @access public * @param string options array of options * default value: * 'preserve_data' => false, * 'use_preg' => true * @param mixed option value * @return mixed IT_OK on success, error object on failure * @see $options */ function setOptions($options) { if (is_array($options)) { foreach ($options as $option => $value) { $error = $this->setOption($option, $value); if (PEAR::isError($error)) { return $error; } } } return IT_OK; } /** * Print a certain block with all replacements done. * @brother get() */ function show($block = '__global__') { print $this->get($block); } // end func show /** * Returns a block with all replacements done. * * @param string name of the block * @return string * @throws PEAR_Error * @access public * @see show() */ function get($block = '__global__') { if ($block == '__global__' && !$this->flagGlobalParsed) { $this->parse('__global__'); } if (!isset($this->blocklist[$block])) { $this->err[] = PEAR::raiseError( $this->errorMessage(IT_BLOCK_NOT_FOUND) . '"' . $block . "'", IT_BLOCK_NOT_FOUND ); return ''; } if (isset($this->blockdata[$block])) { $ret = $this->blockdata[$block]; if ($this->clearCache) { unset($this->blockdata[$block]); } if ($this->_options['preserve_data']) { $ret = str_replace( $this->openingDelimiter . '%preserved%' . $this->closingDelimiter, $this->openingDelimiter, $ret ); } return $ret; } return ''; } // end func get() /** * Parses the given block. * * @param string name of the block to be parsed * @access public * @see parseCurrentBlock() * @throws PEAR_Error */ function parse($block = '__global__', $flag_recursion = false) { static $regs, $values; if (!isset($this->blocklist[$block])) { return PEAR::raiseError( $this->errorMessage( IT_BLOCK_NOT_FOUND ) . '"' . $block . "'", IT_BLOCK_NOT_FOUND ); } if ($block == '__global__') { $this->flagGlobalParsed = true; } if (!$flag_recursion) { $regs = array(); $values = array(); } $outer = $this->blocklist[$block]; $empty = true; if ($this->clearCacheOnParse) { foreach ($this->variableCache as $name => $value) { $regs[] = $this->openingDelimiter . $name . $this->closingDelimiter; $values[] = $value; $empty = false; } $this->variableCache = array(); } else { foreach ($this->blockvariables[$block] as $allowedvar => $v) { if (isset($this->variableCache[$allowedvar])) { $regs[] = $this->openingDelimiter . $allowedvar . $this->closingDelimiter; $values[] = $this->variableCache[$allowedvar]; unset($this->variableCache[$allowedvar]); $empty = false; } } } if (isset($this->blockinner[$block])) { foreach ($this->blockinner[$block] as $k => $innerblock) { $this->parse($innerblock, true); if ($this->blockdata[$innerblock] != '') { $empty = false; } $placeholder = $this->openingDelimiter . "__" . $innerblock . "__" . $this->closingDelimiter; $outer = str_replace( $placeholder, $this->blockdata[$innerblock], $outer ); $this->blockdata[$innerblock] = ""; } } if (!$flag_recursion && 0 != count($values)) { if ($this->_options['use_preg']) { $regs = array_map(array( &$this, '_addPregDelimiters'), $regs ); $funcReplace = 'preg_replace'; } else { $funcReplace = 'str_replace'; } if ($this->_options['preserve_data']) { $values = array_map( array(&$this, '_preserveOpeningDelimiter'), $values ); } $outer = $funcReplace($regs, $values, $outer); if ($this->removeUnknownVariables) { $outer = preg_replace($this->removeVariablesRegExp, "", $outer); } } if ($empty) { if (!$this->removeEmptyBlocks) { $this->blockdata[$block ].= $outer; } else { if (isset($this->touchedBlocks[$block])) { $this->blockdata[$block] .= $outer; unset($this->touchedBlocks[$block]); } } } else { if (empty($this->blockdata[$block])) { $this->blockdata[$block] = $outer; } else { $this->blockdata[$block] .= $outer; } } return $empty; } // end func parse /** * Parses the current block * @see parse(), setCurrentBlock(), $currentBlock * @access public */ function parseCurrentBlock() { return $this->parse($this->currentBlock); } // end func parseCurrentBlock /** * Sets a variable value. * * The function can be used eighter like setVariable( "varname", "value") * or with one array $variables["varname"] = "value" * given setVariable($variables) quite like phplib templates set_var(). * * @param mixed string with the variable name or an array * %variables["varname"] = "value" * @param string value of the variable or empty if $variable * is an array. * @param string prefix for variable names * @access public */ function setVariable($variable, $value = '') { if (is_array($variable)) { $this->variableCache = array_merge( $this->variableCache, $variable ); } else { $this->variableCache[$variable] = $value; } } // end func setVariable /** * Sets the name of the current block that is the block where variables * are added. * * @param string name of the block * @return boolean false on failure, otherwise true * @throws PEAR_Error * @access public */ function setCurrentBlock($block = '__global__') { if (!isset($this->blocklist[$block])) { return PEAR::raiseError( $this->errorMessage( IT_BLOCK_NOT_FOUND ) . '"' . $block . "'", IT_BLOCK_NOT_FOUND ); } $this->currentBlock = $block; return true; } // end func setCurrentBlock /** * Preserves an empty block even if removeEmptyBlocks is true. * * @param string name of the block * @return boolean false on false, otherwise true * @throws PEAR_Error * @access public * @see $removeEmptyBlocks */ function touchBlock($block) { if (!isset($this->blocklist[$block])) { return PEAR::raiseError( $this->errorMessage(IT_BLOCK_NOT_FOUND) . '"' . $block . "'", IT_BLOCK_NOT_FOUND); } $this->touchedBlocks[$block] = true; return true; } // end func touchBlock /** * Clears all datafields of the object and rebuild the internal blocklist * * LoadTemplatefile() and setTemplate() automatically call this function * when a new template is given. Don't use this function * unless you know what you're doing. * * @access public * @see free() */ function init() { $this->free(); $this->findBlocks($this->template); // we don't need it any more $this->template = ''; $this->buildBlockvariablelist(); } // end func init /** * Clears all datafields of the object. * * Don't use this function unless you know what you're doing. * * @access public * @see init() */ function free() { $this->err = array(); $this->currentBlock = '__global__'; $this->variableCache = array(); $this->blocklist = array(); $this->touchedBlocks = array(); $this->flagBlocktrouble = false; $this->flagGlobalParsed = false; } // end func free /** * Sets the template. * * You can eighter load a template file from disk with * LoadTemplatefile() or set the template manually using this function. * * @param string template content * @param boolean remove unknown/unused variables? * @param boolean remove empty blocks? * @see LoadTemplatefile(), $template * @access public * @return boolean */ function setTemplate( $template, $removeUnknownVariables = true, $removeEmptyBlocks = true) { $this->removeUnknownVariables = $removeUnknownVariables; $this->removeEmptyBlocks = $removeEmptyBlocks; if ($template == '' && $this->flagCacheTemplatefile) { $this->variableCache = array(); $this->blockdata = array(); $this->touchedBlocks = array(); $this->currentBlock = '__global__'; } else { $this->template = '' . $template . ''; $this->init(); } if ($this->flagBlocktrouble) { return false; } return true; } // end func setTemplate /** * Reads a template file from the disk. * * @param string name of the template file * @param bool how to handle unknown variables. * @param bool how to handle empty blocks. * @access public * @return boolean false on failure, otherwise true * @see $template, setTemplate(), $removeUnknownVariables, * $removeEmptyBlocks */ function loadTemplatefile( $filename, $removeUnknownVariables = true, $removeEmptyBlocks = true ) { $template = ''; if (!$this->flagCacheTemplatefile || $this->lastTemplatefile != $filename ) { $template = $this->getFile($filename); } $this->lastTemplatefile = $filename; return $template != '' ? $this->setTemplate( $template,$removeUnknownVariables, $removeEmptyBlocks ) : false; } // end func LoadTemplatefile /** * Sets the file root. The file root gets prefixed to all filenames passed * to the object. * * Make sure that you override this function when using the class * on windows. * * @param string * @see HTML_Template_IT() * @access public */ function setRoot($root) { if ($root != '' && substr($root, -1) != '/') { $root .= '/'; } $this->fileRoot = $root; } // end func setRoot /** * Build a list of all variables within of a block */ function buildBlockvariablelist() { foreach ($this->blocklist as $name => $content) { preg_match_all($this->variablesRegExp, $content, $regs); if (count($regs[1]) != 0) { foreach ($regs[1] as $k => $var) { $this->blockvariables[$name][$var] = true; } } else { $this->blockvariables[$name] = array(); } } } // end func buildBlockvariablelist /** * Returns a list of all global variables */ function getGlobalvariables() { $regs = array(); $values = array(); foreach ($this->blockvariables['__global__'] as $allowedvar => $v) { if (isset($this->variableCache[$allowedvar])) { $regs[] = '@' . $this->openingDelimiter . $allowedvar . $this->closingDelimiter . '@'; $values[] = $this->variableCache[$allowedvar]; unset($this->variableCache[$allowedvar]); } } return array($regs, $values); } // end func getGlobalvariables /** * Recusively builds a list of all blocks within the template. * * @param string string that gets scanned * @see $blocklist */ function findBlocks($string) { $blocklist = array(); if (preg_match_all($this->blockRegExp, $string, $regs, PREG_SET_ORDER)) { foreach ($regs as $k => $match) { $blockname = $match[1]; $blockcontent = $match[2]; if (isset($this->blocklist[$blockname])) { $this->err[] = PEAR::raiseError( $this->errorMessage( IT_BLOCK_DUPLICATE, $blockname), IT_BLOCK_DUPLICATE ); $this->flagBlocktrouble = true; } $this->blocklist[$blockname] = $blockcontent; $this->blockdata[$blockname] = ""; $blocklist[] = $blockname; $inner = $this->findBlocks($blockcontent); foreach ($inner as $k => $name) { $pattern = sprintf( '@(.*)@sm', $name, $name ); $this->blocklist[$blockname] = preg_replace( $pattern, $this->openingDelimiter . '__' . $name . '__' . $this->closingDelimiter, $this->blocklist[$blockname] ); $this->blockinner[$blockname][] = $name; $this->blockparents[$name] = $blockname; } } } return $blocklist; } // end func findBlocks /** * Reads a file from disk and returns its content. * @param string Filename * @return string Filecontent */ function getFile($filename) { if ($filename{0} == '/' && substr($this->fileRoot, -1) == '/') { $filename = substr($filename, 1); } $filename = $this->fileRoot . $filename; if (!($fh = @fopen($filename, 'r'))) { $this->err[] = PEAR::raiseError( $this->errorMessage(IT_TPL_NOT_FOUND) . ': "' .$filename .'"', IT_TPL_NOT_FOUND ); return ""; } $fsize = filesize($filename); if ($fsize < 1) { fclose($fh); return ''; } $content = fread($fh, $fsize); fclose($fh); return preg_replace( "##ime", "\$this->getFile('\\1')", $content ); } // end func getFile /** * Adds delimiters to a string, so it can be used as a pattern * in preg_* functions * * @param string * @return string */ function _addPregDelimiters($str) { return '@' . $str . '@'; } /** * Replaces an opening delimiter by a special string * * @param string * @return string */ function _preserveOpeningDelimiter($str) { return (false === strpos($str, $this->openingDelimiter))? $str: str_replace( $this->openingDelimiter, $this->openingDelimiter . '%preserved%' . $this->closingDelimiter, $str ); } /** * Return a textual error message for a IT error code * * @param integer $value error code * * @return string error message, or false if the error code was * not recognized */ function errorMessage($value, $blockname = '') { static $errorMessages; if (!isset($errorMessages)) { $errorMessages = array( IT_OK => '', IT_ERROR => 'unknown error', IT_TPL_NOT_FOUND => 'Cannot read the template file', IT_BLOCK_NOT_FOUND => 'Cannot find this block', IT_BLOCK_DUPLICATE => 'The name of a block must be'. ' uniquewithin a template.'. ' Found "' . $blockname . '" twice.'. 'Unpredictable results '. 'may appear.', IT_UNKNOWN_OPTION => 'Unknown option' ); } if (PEAR::isError($value)) { $value = $value->getCode(); } return isset($errorMessages[$value]) ? $errorMessages[$value] : $errorMessages[IT_ERROR]; } } // end class IntegratedTemplate ?> catalog/libs/PEAR/HTML/Template/ITX.php0000644577340101002240000006561310625430030021335 0ustar tonerlogicspg11675700000000000000 | // | Pierre-Alain Joye | // +----------------------------------------------------------------------+ // // $Id: ITX.php,v 1.16 2006/08/17 15:47:22 dsp Exp $ // require_once 'HTML/Template/IT.php'; require_once 'HTML/Template/IT_Error.php'; /** * Integrated Template Extension - ITX * * With this class you get the full power of the phplib template class. * You may have one file with blocks in it but you have as well one main file * and multiple files one for each block. This is quite usefull when you have * user configurable websites. Using blocks not in the main template allows * you to modify some parts of your layout easily. * * Note that you can replace an existing block and add new blocks at runtime. * Adding new blocks means changing a variable placeholder to a block. * * @author Ulf Wendel * @access public * @version $Id: ITX.php,v 1.16 2006/08/17 15:47:22 dsp Exp $ * @package HTML_Template_IT */ class HTML_Template_ITX extends HTML_Template_IT { /** * Array with all warnings. * @var array * @access public * @see $printWarning, $haltOnWarning, warning() */ var $warn = array(); /** * Print warnings? * @var array * @access public * @see $haltOnWarning, $warn, warning() */ var $printWarning = false; /** * Call die() on warning? * @var boolean * @access public * @see $warn, $printWarning, warning() */ var $haltOnWarning = false; /** * RegExp used to test for a valid blockname. * @var string */ var $checkblocknameRegExp = ''; /** * Functionnameprefix used when searching function calls in the template. * @var string */ var $functionPrefix = 'func_'; /** * Functionname RegExp. * @var string */ var $functionnameRegExp = '[_a-zA-Z]+[A-Za-z_0-9]*'; /** * RegExp used to grep function calls in the template. * * The variable gets set by the constructor. * * @var string * @see HTML_Template_IT() */ var $functionRegExp = ''; /** * List of functions found in the template. * * @var array */ var $functions = array(); /** * List of callback functions specified by the user. * * @var array */ var $callback = array(); /** * Builds some complex regexps and calls the constructor * of the parent class. * * Make sure that you call this constructor if you derive your own * template class from this one. * * @see HTML_Template_IT() */ function HTML_Template_ITX($root = '') { $this->checkblocknameRegExp = '@' . $this->blocknameRegExp . '@'; $this->functionRegExp = '@' . $this->functionPrefix . '(' . $this->functionnameRegExp . ')\s*\(@sm'; $this->HTML_Template_IT($root); } // end func constructor function init() { $this->free(); $this->buildFunctionlist(); $this->findBlocks($this->template); // we don't need it any more $this->template = ''; $this->buildBlockvariablelist(); } // end func init /** * Replaces an existing block with new content. * * This function will replace a block of the template and all blocks * contained in the replaced block and add a new block insted, means * you can dynamically change your template. * * Note that changing the template structure violates one of the IT[X] * development goals. I've tried to write a simple to use template engine * supporting blocks. In contrast to other systems IT[X] analyses the way * you've nested blocks and knows which block belongs into another block. * The nesting information helps to make the API short and simple. Replacing * blocks does not only mean that IT[X] has to update the nesting * information (relatively time consumpting task) but you have to make sure * that you do not get confused due to the template change itself. * * @param string Blockname * @param string Blockcontent * @param boolean true if the new block inherits the content * of the old block * @return boolean * @throws IT_Error * @see replaceBlockfile(), addBlock(), addBlockfile() * @access public */ function replaceBlock($block, $template, $keep_content = false) { if (!isset($this->blocklist[$block])) { return new IT_Error( "The block "."'$block'". " does not exist in the template and thus it can't be replaced.", __FILE__, __LINE__ ); } if ($template == '') { return new IT_Error('No block content given.', __FILE__, __LINE__); } if ($keep_content) { $blockdata = $this->blockdata[$block]; } // remove all kinds of links to the block / data of the block $this->removeBlockData($block); $template = "" . $template . ""; $parents = $this->blockparents[$block]; $this->findBlocks($template); $this->blockparents[$block] = $parents; // KLUDGE: rebuild the list for all block - could be done faster $this->buildBlockvariablelist(); if ($keep_content) { $this->blockdata[$block] = $blockdata; } // old TODO - I'm not sure if we need this // update caches return true; } // end func replaceBlock /** * Replaces an existing block with new content from a file. * * @brother replaceBlock() * @param string Blockname * @param string Name of the file that contains the blockcontent * @param boolean true if the new block inherits the content of the old block * @access public */ function replaceBlockfile($block, $filename, $keep_content = false) { return $this->replaceBlock($block, $this->getFile($filename), $keep_content); } // end func replaceBlockfile /** * Adds a block to the template changing a variable placeholder * to a block placeholder. * * Add means "replace a variable placeholder by a new block". * This is different to PHPLibs templates. The function loads a * block, creates a handle for it and assigns it to a certain * variable placeholder. To to the same with PHPLibs templates you would * call set_file() to create the handle and parse() to assign the * parsed block to a variable. By this PHPLibs templates assume * that you tend to assign a block to more than one one placeholder. * To assign a parsed block to more than only the placeholder you specify * in this function you have to use a combination of getBlock() * and setVariable(). * * As no updates to cached data is necessary addBlock() and addBlockfile() * are rather "cheap" meaning quick operations. * * The block content must not start with * and end with this would cause overhead and * produce an error. * * @param string Name of the variable placeholder, the name must be unique * within the template. * @param string Name of the block to be added * @param string Content of the block * @return boolean * @throws IT_Error * @see addBlockfile() * @access public */ function addBlock($placeholder, $blockname, $template) { // Don't trust any user even if it's a programmer or yourself... if ($placeholder == '') { return new IT_Error('No variable placeholder given.', __FILE__, __LINE__ ); } elseif ($blockname == '' || !preg_match($this->checkblocknameRegExp, $blockname) ) { return new IT_Error("No or invalid blockname '$blockname' given.", __FILE__, __LINE__ ); } elseif ($template == '') { return new IT_Error('No block content given.', __FILE__, __LINE__); } elseif (isset($this->blocklist[$blockname])) { return new IT_Error('The block already exists.', __FILE__, __LINE__ ); } // find out where to insert the new block $parents = $this->findPlaceholderBlocks($placeholder); if (count($parents) == 0) { return new IT_Error( "The variable placeholder". " '$placeholder' was not found in the template.", __FILE__, __LINE__ ); } elseif (count($parents) > 1) { reset($parents); while (list($k, $parent) = each($parents)) { $msg .= "$parent, "; } $msg = substr($parent, -2); return new IT_Error("The variable placeholder "."'$placeholder'". " must be unique, found in multiple blocks '$msg'.", __FILE__, __LINE__ ); } $template = "" . $template . ""; $this->findBlocks($template); if ($this->flagBlocktrouble) { return false; // findBlocks() already throws an exception } $this->blockinner[$parents[0]][] = $blockname; $this->blocklist[$parents[0]] = preg_replace( '@' . $this->openingDelimiter . $placeholder . $this->closingDelimiter . '@', $this->openingDelimiter . '__' . $blockname . '__' . $this->closingDelimiter, $this->blocklist[$parents[0]] ); $this->deleteFromBlockvariablelist($parents[0], $placeholder); $this->updateBlockvariablelist($blockname); return true; } // end func addBlock /** * Adds a block taken from a file to the template changing a variable * placeholder to a block placeholder. * * @param string Name of the variable placeholder to be converted * @param string Name of the block to be added * @param string File that contains the block * @brother addBlock() * @access public */ function addBlockfile($placeholder, $blockname, $filename) { return $this->addBlock($placeholder, $blockname, $this->getFile($filename)); } // end func addBlockfile /** * Returns the name of the (first) block that contains * the specified placeholder. * * @param string Name of the placeholder you're searching * @param string Name of the block to scan. If left out (default) * all blocks are scanned. * @return string Name of the (first) block that contains * the specified placeholder. * If the placeholder was not found or an error occured * an empty string is returned. * @throws IT_Error * @access public */ function placeholderExists($placeholder, $block = '') { if ($placeholder == '') { new IT_Error('No placeholder name given.', __FILE__, __LINE__); return ''; } if ($block != '' && !isset($this->blocklist[$block])) { new IT_Error("Unknown block '$block'.", __FILE__, __LINE__); return ''; } // name of the block where the given placeholder was found $found = ''; if ($block != '') { if (is_array($variables = $this->blockvariables[$block])) { // search the value in the list of blockvariables reset($variables); while (list($k, $variable) = each($variables)) { if ($k == $placeholder) { $found = $block; break; } } } } else { // search all blocks and return the name of the first block that // contains the placeholder reset($this->blockvariables); while (list($blockname, $variables) = each($this->blockvariables)){ if (is_array($variables) && isset($variables[$placeholder])) { $found = $blockname; break; } } } return $found; } // end func placeholderExists /** * Checks the list of function calls in the template and * calls their callback function. * * @access public */ function performCallback() { reset($this->functions); while (list($func_id, $function) = each($this->functions)) { if (isset($this->callback[$function['name']])) { if ($this->callback[$function['name']]['expandParameters']) { $callFunction = 'call_user_func_array'; } else { $callFunction = 'call_user_func'; } if ($this->callback[$function['name']]['object'] != '') { $call = $callFunction( array( &$GLOBALS[$this->callback[$function['name']]['object']], $this->callback[$function['name']]['function']), $function['args'] ); } else { $call = $callFunction( $this->callback[$function['name']]['function'], $function['args'] ); } $this->variableCache['__function' . $func_id . '__'] = $call; } } } // end func performCallback /** * Returns a list of all function calls in the current template. * * @return array * @access public */ function getFunctioncalls() { return $this->functions; } // end func getFunctioncalls /** * Replaces a function call with the given replacement. * * @param int Function ID * @param string Replacement * @deprecated */ function setFunctioncontent($functionID, $replacement) { $this->variableCache['__function' . $functionID . '__'] = $replacement; } // end func setFunctioncontent /** * Sets a callback function. * * IT[X] templates (note the X) can contain simple function calls. * "function call" means that the editor of the template can add * special placeholder to the template like 'func_h1("embedded in h1")'. * IT[X] will grab this function calls and allow you to define a callback * function for them. * * This is an absolutely evil feature. If your application makes heavy * use of such callbacks and you're even implementing if-then etc. on * the level of a template engine you're reiventing the wheel... - that's * actually how PHP came into life. Anyway, sometimes it's handy. * * Consider also using XML/XSLT or native PHP. And please do not push * IT[X] any further into this direction of adding logics to the template * engine. * * For those of you ready for the X in IT[X]: * * %s', $args[0]); * } * * ... * $itx = new HTML_Template_ITX( ... ); * ... * $itx->setCallbackFunction('h1', 'h_one'); * $itx->performCallback(); * ?> * * template: * func_h1('H1 Headline'); * * @param string Function name in the template * @param string Name of the callback function * @param string Name of the callback object * @param boolean If the callback is called with a list of parameters or * with an array holding the parameters * @return boolean False on failure. * @throws IT_Error * @access public * @deprecated The $callbackobject parameter is depricated since * version 1.2 and might be dropped in further versions. */ function setCallbackFunction($tplfunction, $callbackfunction, $callbackobject = '', $expandCallbackParameters=false) { if ($tplfunction == '' || $callbackfunction == '') { return new IT_Error( "No template function "."('$tplfunction')". " and/or no callback function ('$callback') given.", __FILE__, __LINE__ ); } $this->callback[$tplfunction] = array( 'function' => $callbackfunction, 'object' => $callbackobject, 'expandParameters' => (boolean) $expandCallbackParameters ); return true; } // end func setCallbackFunction /** * Sets the Callback function lookup table * * @param array function table * array[templatefunction] = * array( * "function" => userfunction, * "object" => userobject * ) * @access public */ function setCallbackFuntiontable($functions) { $this->callback = $functions; } // end func setCallbackFunctiontable /** * Recursively removes all data assiciated with a block, including all inner blocks * * @param string block to be removed * @access private */ function removeBlockData($block) { if (isset($this->blockinner[$block])) { foreach ($this->blockinner[$block] as $k => $inner) { $this->removeBlockData($inner); } unset($this->blockinner[$block]); } unset($this->blocklist[$block]); unset($this->blockdata[$block]); unset($this->blockvariables[$block]); unset($this->touchedBlocks[$block]); } // end func removeBlockinner /** * Returns a list of blocknames in the template. * * @return array [blockname => blockname] * @access public * @see blockExists() */ function getBlocklist() { $blocklist = array(); foreach ($this->blocklist as $block => $content) { $blocklist[$block] = $block; } return $blocklist; } // end func getBlocklist /** * Checks wheter a block exists. * * @param string * @return boolean * @access public * @see getBlocklist() */ function blockExists($blockname) { return isset($this->blocklist[$blockname]); } // end func blockExists /** * Returns a list of variables of a block. * * @param string Blockname * @return array [varname => varname] * @access public * @see BlockvariableExists() */ function getBlockvariables($block) { if (!isset($this->blockvariables[$block])) { return array(); } $variables = array(); foreach ($this->blockvariables[$block] as $variable => $v) { $variables[$variable] = $variable; } return $variables; } // end func getBlockvariables /** * Checks wheter a block variable exists. * * @param string Blockname * @param string Variablename * @return boolean * @access public * @see getBlockvariables() */ function BlockvariableExists($block, $variable) { return isset($this->blockvariables[$block][$variable]); } // end func BlockvariableExists /** * Builds a functionlist from the template. * @access private */ function buildFunctionlist() { $this->functions = array(); $template = $this->template; $num = 0; while (preg_match($this->functionRegExp, $template, $regs)) { $pos = strpos($template, $regs[0]); $template = substr($template, $pos + strlen($regs[0])); $head = $this->getValue($template, ')'); $args = array(); $search = $regs[0] . $head . ')'; $replace = $this->openingDelimiter . '__function' . $num . '__' . $this->closingDelimiter; $this->template = str_replace($search, $replace, $this->template); $template = str_replace($search, $replace, $template); while ($head != '' && $args2 = $this->getValue($head, ',')) { $arg2 = trim($args2); $args[] = ('"' == $arg2{0} || "'" == $arg2{0}) ? substr($arg2, 1, -1) : $arg2; if ($arg2 == $head) { break; } $head = substr($head, strlen($arg2) + 1); } $this->functions[$num++] = array( 'name' => $regs[1], 'args' => $args ); } } // end func buildFunctionlist /** * Truncates the given code from the first occurence of * $delimiter but ignores $delimiter enclosed by " or '. * * @access private * @param string The code which should be parsed * @param string The delimiter char * @return string * @see buildFunctionList() */ function getValue($code, $delimiter) { if ($code == '') { return ''; } if (!is_array($delimiter)) { $delimiter = array( $delimiter => true ); } $len = strlen($code); $enclosed = false; $enclosed_by = ''; if (isset($delimiter[$code[0]])) { $i = 1; } else { for ($i = 0; $i < $len; ++$i) { $char = $code[$i]; if ( ($char == '"' || $char == "'") && ($char == $enclosed_by || '' == $enclosed_by) && (0 == $i || ($i > 0 && '\\' != $code[$i - 1])) ) { if (!$enclosed) { $enclosed_by = $char; } else { $enclosed_by = ""; } $enclosed = !$enclosed; } if (!$enclosed && isset($delimiter[$char])) { break; } } } return substr($code, 0, $i); } // end func getValue /** * Deletes one or many variables from the block variable list. * * @param string Blockname * @param mixed Name of one variable or array of variables * ( array ( name => true ) ) to be stripped. * @access private */ function deleteFromBlockvariablelist($block, $variables) { if (!is_array($variables)) { $variables = array($variables => true); } reset($this->blockvariables[$block]); while (list($varname, $val) = each($this->blockvariables[$block])) { if (isset($variables[$varname])) { unset($this->blockvariables[$block][$varname]); } } } // end deleteFromBlockvariablelist /** * Updates the variable list of a block. * * @param string Blockname * @access private */ function updateBlockvariablelist($block) { preg_match_all( $this->variablesRegExp, $this->blocklist[$block], $regs ); if (count($regs[1]) != 0) { foreach ($regs[1] as $k => $var) { $this->blockvariables[$block][$var] = true; } } else { $this->blockvariables[$block] = array(); } // check if any inner blocks were found if (isset($this->blockinner[$block]) && is_array($this->blockinner[$block]) && count($this->blockinner[$block]) > 0 ) { /* * loop through inner blocks, registering the variable * placeholders in each */ foreach ($this->blockinner[$block] as $childBlock) { $this->updateBlockvariablelist($childBlock); } } } // end func updateBlockvariablelist /** * Returns an array of blocknames where the given variable * placeholder is used. * * @param string Variable placeholder * @return array $parents parents[0..n] = blockname * @access public */ function findPlaceholderBlocks($variable) { $parents = array(); reset($this->blocklist); while (list($blockname, $content) = each($this->blocklist)) { reset($this->blockvariables[$blockname]); while ( list($varname, $val) = each($this->blockvariables[$blockname])) { if ($variable == $varname) { $parents[] = $blockname; } } } return $parents; } // end func findPlaceholderBlocks /** * Handles warnings, saves them to $warn and prints them or * calls die() depending on the flags * * @param string Warning * @param string File where the warning occured * @param int Linenumber where the warning occured * @see $warn, $printWarning, $haltOnWarning * @access private */ function warning($message, $file = '', $line = 0) { $message = sprintf( 'HTML_Template_ITX Warning: %s [File: %s, Line: %d]', $message, $file, $line ); $this->warn[] = $message; if ($this->printWarning) { print $message; } if ($this->haltOnWarning) { die($message); } } // end func warning } // end class HTML_Template_ITX ?> catalog/libs/PEAR/HTML/Template/IT_Error.php0000644577340101002240000000336310625430027022356 0ustar tonerlogicspg11675700000000000000 | // | Pierre-Alain Joye | // +----------------------------------------------------------------------+ // // $Id: IT_Error.php,v 1.3 2006/08/17 15:44:31 dsp Exp $ require_once "PEAR.php"; /** * IT[X] Error class * * @package HTML_Template_IT */ class IT_Error extends PEAR_Error { /** * Prefix of all error messages. * * @var string */ var $error_message_prefix = "IntegratedTemplate Error: "; /** * Creates an cache error object. * * @param string error message * @param string file where the error occured * @param string linenumber where the error occured */ function IT_Error($msg, $file = __FILE__, $line = __LINE__) { $this->PEAR_Error(sprintf("%s [%s on line %d].", $msg, $file, $line)); } // end func IT_Error } // end class IT_Error ?> catalog/libs/PEAR/MDB2/0000755577340101002240000000000010625430045016320 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/MDB2/Driver/0000755577340101002240000000000010625430041017547 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/MDB2/Driver/Datatype/0000755577340101002240000000000010625430033021323 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/MDB2/Driver/Datatype/Common.php0000644577340101002240000016337510625430036023306 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Common.php,v 1.112 2006/10/14 13:42:00 lsmith Exp $ require_once 'MDB2/LOB.php'; /** * @package MDB2 * @category Database * @author Lukas Smith */ /** * MDB2_Driver_Common: Base class that is extended by each MDB2 driver * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Driver_Datatype_Common extends MDB2_Module_Common { var $valid_default_values = array( 'text' => '', 'boolean' => true, 'integer' => 0, 'decimal' => 0.0, 'float' => 0.0, 'timestamp' => '1970-01-01 00:00:00', 'time' => '00:00:00', 'date' => '1970-01-01', 'clob' => '', 'blob' => '', ); /** * contains all LOB objects created with this MDB2 instance * @var array * @access protected */ var $lobs = array(); // }}} // {{{ getValidTypes() /** * Get the list of valid types * * This function returns an array of valid types as keys with the values * being possible default values for all native datatypes and mapped types * for custom datatypes. * * @return mixed array on success, a MDB2 error on failure * @access public */ function getValidTypes() { $types = $this->valid_default_values; $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!empty($db->options['datatype_map'])) { foreach ($db->options['datatype_map'] as $type => $mapped_type) { if (array_key_exists($mapped_type, $types)) { $types[$type] = $types[$mapped_type]; } elseif (!empty($db->options['datatype_map_callback'][$type])) { $parameter = array('type' => $type, 'mapped_type' => $mapped_type); $default = call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter)); $types[$type] = $default; } } } return $types; } // }}} // {{{ checkResultTypes() /** * Define the list of types to be associated with the columns of a given * result set. * * This function may be called before invoking fetchRow(), fetchOne() * fetchCole() and fetchAll() so that the necessary data type * conversions are performed on the data to be retrieved by them. If this * function is not called, the type of all result set columns is assumed * to be text, thus leading to not perform any conversions. * * @param string $types array variable that lists the * data types to be expected in the result set columns. If this array * contains less types than the number of columns that are returned * in the result set, the remaining columns are assumed to be of the * type text. Currently, the types clob and blob are not fully * supported. * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function checkResultTypes($types) { $types = is_array($types) ? $types : array($types); foreach ($types as $key => $type) { if (!isset($this->valid_default_values[$type])) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (empty($db->options['datatype_map'][$type])) { return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, $type.' for '.$key.' is not a supported column type', __FUNCTION__); } } } return $types; } // }}} // {{{ _baseConvertResult() /** * general type conversion method * * @param mixed $value refernce to a value to be converted * @param string $type specifies which type to convert to * @return object a MDB2 error on failure * @access protected */ function _baseConvertResult($value, $type, $rtrim = true) { switch ($type) { case 'text': if ($rtrim) { $value = rtrim($value); } return $value; case 'integer': return intval($value); case 'boolean': return !empty($value); case 'decimal': return $value; case 'float': return doubleval($value); case 'date': return $value; case 'time': return $value; case 'timestamp': return $value; case 'clob': case 'blob': $this->lobs[] = array( 'buffer' => null, 'position' => 0, 'lob_index' => null, 'endOfLOB' => false, 'resource' => $value, 'value' => null, 'loaded' => false, ); end($this->lobs); $lob_index = key($this->lobs); $this->lobs[$lob_index]['lob_index'] = $lob_index; return fopen('MDB2LOB://'.$lob_index.'@'.$this->db_index, 'r+'); } $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_INVALID, null, null, 'attempt to convert result value to an unknown type :' . $type, __FUNCTION__); } // }}} // {{{ convertResult() /** * convert a value to a RDBMS indepdenant MDB2 type * * @param mixed $value value to be converted * @param string $type specifies which type to convert to * @param bool $rtrim if to rtrim text values or not * @return mixed converted value * @access public */ function convertResult($value, $type, $rtrim = true) { if (is_null($value)) { return null; } $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!empty($db->options['datatype_map'][$type])) { $type = $db->options['datatype_map'][$type]; if (!empty($db->options['datatype_map_callback'][$type])) { $parameter = array('type' => $type, 'value' => $value, 'rtrim' => $rtrim); return call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter)); } } return $this->_baseConvertResult($value, $type, $rtrim); } // }}} // {{{ convertResultRow() /** * convert a result row * * @param array $types * @param array $row specifies the types to convert to * @param bool $rtrim if to rtrim text values or not * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function convertResultRow($types, $row, $rtrim = true) { reset($types); $current_column = -1; foreach ($row as $key => $value) { ++$current_column; if (!isset($value)) { continue; } if (isset($types[$current_column])) { $type = $types[$current_column]; } elseif (isset($types[$key])) { $type = $types[$key]; } elseif (current($types)) { $type = current($types); next($types); } else { continue; } $value = $this->convertResult($row[$key], $type, $rtrim); if (PEAR::isError($value)) { return $value; } $row[$key] = $value; } return $row; } // }}} // {{{ getDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare * of the given type * * @param string $type type to which the value should be converted to * @param string $name name the field to be declared. * @param string $field definition of the field * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access public */ function getDeclaration($type, $name, $field) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!empty($db->options['datatype_map'][$type])) { $type = $db->options['datatype_map'][$type]; if (!empty($db->options['datatype_map_callback'][$type])) { $parameter = array('type' => $type, 'name' => $name, 'field' => $field); return call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter)); } } if (!method_exists($this, "_get{$type}Declaration")) { return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'type not defined: '.$type, __FUNCTION__); } return $this->{"_get{$type}Declaration"}($name, $field); } // }}} // {{{ getTypeDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare an text type * field to be used in statements like CREATE TABLE. * * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * length * Integer value that determines the maximum length of the text * field. If this argument is missing the field should be * declared to have the longest length allowed by the DBMS. * * default * Text value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access public */ function getTypeDeclaration($field) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } switch ($field['type']) { case 'text': $length = !empty($field['length']) ? $field['length'] : $db->options['default_text_field_length']; $fixed = !empty($field['fixed']) ? $field['fixed'] : false; return $fixed ? ($length ? 'CHAR('.$length.')' : 'CHAR('.$db->options['default_text_field_length'].')') : ($length ? 'VARCHAR('.$length.')' : 'TEXT'); case 'clob': return 'TEXT'; case 'blob': return 'TEXT'; case 'integer': return 'INT'; case 'boolean': return 'INT'; case 'date': return 'CHAR ('.strlen('YYYY-MM-DD').')'; case 'time': return 'CHAR ('.strlen('HH:MM:SS').')'; case 'timestamp': return 'CHAR ('.strlen('YYYY-MM-DD HH:MM:SS').')'; case 'float': return 'TEXT'; case 'decimal': return 'TEXT'; } return ''; } // }}} // {{{ _getDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare a generic type * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * length * Integer value that determines the maximum length of the text * field. If this argument is missing the field should be * declared to have the longest length allowed by the DBMS. * * default * Text value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * charset * Text value with the default CHARACTER SET for this field. * collation * Text value with the default COLLATION for this field. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getDeclaration($name, $field) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $default = ''; if (array_key_exists('default', $field)) { if ($field['default'] === '') { $field['default'] = empty($field['notnull']) ? null : $this->valid_default_values[$field['type']]; if ($field['default'] === '' && ($db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) ) { $field['default'] = ' '; } } $default = ' DEFAULT '.$this->quote($field['default'], $field['type']); } elseif (empty($field['notnull'])) { $default = ' DEFAULT NULL'; } $charset = empty($field['charset']) ? '' : ' '.$this->_getCharsetFieldDeclaration($field['charset']); $collation = empty($field['collation']) ? '' : ' '.$this->_getCollationFieldDeclaration($field['collation']); $notnull = empty($field['notnull']) ? '' : ' NOT NULL'; $name = $db->quoteIdentifier($name, true); return $name.' '.$this->getTypeDeclaration($field).$charset.$default.$notnull.$collation; } // }}} // {{{ _getCharsetFieldDeclaration() /** * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET * of a field declaration to be used in statements like CREATE TABLE. * * @param string $charset name of the charset * @return string DBMS specific SQL code portion needed to set the CHARACTER SET * of a field declaration. */ function _getCharsetFieldDeclaration($charset) { return ''; } // }}} // {{{ _getCollationFieldDeclaration() /** * Obtain DBMS specific SQL code portion needed to set the COLLATION * of a field declaration to be used in statements like CREATE TABLE. * * @param string $collation name of the collation * @return string DBMS specific SQL code portion needed to set the COLLATION * of a field declaration. */ function _getCollationFieldDeclaration($collation) { return ''; } // }}} // {{{ _getIntegerDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare an integer type * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * unsigned * Boolean flag that indicates whether the field should be * declared as unsigned integer if possible. * * default * Integer value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getIntegerDeclaration($name, $field) { if (!empty($field['unsigned'])) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $db->warnings[] = "unsigned integer field \"$name\" is being declared as signed integer"; } return $this->_getDeclaration($name, $field); } // }}} // {{{ _getTextDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare an text type * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * length * Integer value that determines the maximum length of the text * field. If this argument is missing the field should be * declared to have the longest length allowed by the DBMS. * * default * Text value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getTextDeclaration($name, $field) { return $this->_getDeclaration($name, $field); } // }}} // {{{ _getCLOBDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare an character * large object type field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * length * Integer value that determines the maximum length of the large * object field. If this argument is missing the field should be * declared to have the longest length allowed by the DBMS. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access public */ function _getCLOBDeclaration($name, $field) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $notnull = empty($field['notnull']) ? '' : ' NOT NULL'; $name = $db->quoteIdentifier($name, true); return $name.' '.$this->getTypeDeclaration($field).$notnull; } // }}} // {{{ _getBLOBDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare an binary large * object type field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * length * Integer value that determines the maximum length of the large * object field. If this argument is missing the field should be * declared to have the longest length allowed by the DBMS. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getBLOBDeclaration($name, $field) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $notnull = empty($field['notnull']) ? '' : ' NOT NULL'; $name = $db->quoteIdentifier($name, true); return $name.' '.$this->getTypeDeclaration($field).$notnull; } // }}} // {{{ _getBooleanDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare a boolean type * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * default * Boolean value to be used as default for this field. * * notnullL * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getBooleanDeclaration($name, $field) { return $this->_getDeclaration($name, $field); } // }}} // {{{ _getDateDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare a date type * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * default * Date value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getDateDeclaration($name, $field) { return $this->_getDeclaration($name, $field); } // }}} // {{{ _getTimestampDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare a timestamp * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * default * Timestamp value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getTimestampDeclaration($name, $field) { return $this->_getDeclaration($name, $field); } // }}} // {{{ _getTimeDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare a time * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * default * Time value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getTimeDeclaration($name, $field) { return $this->_getDeclaration($name, $field); } // }}} // {{{ _getFloatDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare a float type * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * default * Float value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getFloatDeclaration($name, $field) { return $this->_getDeclaration($name, $field); } // }}} // {{{ _getDecimalDeclaration() /** * Obtain DBMS specific SQL code portion needed to declare a decimal type * field to be used in statements like CREATE TABLE. * * @param string $name name the field to be declared. * @param array $field associative array with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * default * Decimal value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * @access protected */ function _getDecimalDeclaration($name, $field) { return $this->_getDeclaration($name, $field); } // }}} // {{{ compareDefinition() /** * Obtain an array of changes that may need to applied * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access public */ function compareDefinition($current, $previous) { $type = !empty($current['type']) ? $current['type'] : null; if (!method_exists($this, "_compare{$type}Definition")) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'type "'.$current['type'].'" is not yet supported', __FUNCTION__); } if (empty($previous['type']) || $previous['type'] != $type) { return $current; } $change = $this->{"_compare{$type}Definition"}($current, $previous); if ($previous['type'] != $type) { $change['type'] = true; } $previous_notnull = !empty($previous['notnull']) ? $previous['notnull'] : false; $notnull = !empty($current['notnull']) ? $current['notnull'] : false; if ($previous_notnull != $notnull) { $change['notnull'] = true; } $previous_default = array_key_exists('default', $previous) ? $previous['default'] : ($previous_notnull ? '' : null); $default = array_key_exists('default', $current) ? $current['default'] : ($notnull ? '' : null); if ($previous_default !== $default) { $change['default'] = true; } return $change; } // }}} // {{{ _compareIntegerDefinition() /** * Obtain an array of changes that may need to applied to an integer field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareIntegerDefinition($current, $previous) { $change = array(); $previous_unsigned = !empty($previous['unsigned']) ? $previous['unsigned'] : false; $unsigned = !empty($current['unsigned']) ? $current['unsigned'] : false; if ($previous_unsigned != $unsigned) { $change['unsigned'] = true; } $previous_autoincrement = !empty($previous['autoincrement']) ? $previous['autoincrement'] : false; $autoincrement = !empty($current['autoincrement']) ? $current['autoincrement'] : false; if ($previous_autoincrement != $autoincrement) { $change['autoincrement'] = true; } return $change; } // }}} // {{{ _compareTextDefinition() /** * Obtain an array of changes that may need to applied to an text field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareTextDefinition($current, $previous) { $change = array(); $previous_length = !empty($previous['length']) ? $previous['length'] : 0; $length = !empty($current['length']) ? $current['length'] : 0; if ($previous_length != $length) { $change['length'] = true; } $previous_fixed = !empty($previous['fixed']) ? $previous['fixed'] : 0; $fixed = !empty($current['fixed']) ? $current['fixed'] : 0; if ($previous_fixed != $fixed) { $change['fixed'] = true; } return $change; } // }}} // {{{ _compareCLOBDefinition() /** * Obtain an array of changes that may need to applied to an CLOB field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareCLOBDefinition($current, $previous) { return $this->_compareTextDefinition($current, $previous); } // }}} // {{{ _compareBLOBDefinition() /** * Obtain an array of changes that may need to applied to an BLOB field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareBLOBDefinition($current, $previous) { return $this->_compareTextDefinition($current, $previous); } // }}} // {{{ _compareDateDefinition() /** * Obtain an array of changes that may need to applied to an date field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareDateDefinition($current, $previous) { return array(); } // }}} // {{{ _compareTimeDefinition() /** * Obtain an array of changes that may need to applied to an time field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareTimeDefinition($current, $previous) { return array(); } // }}} // {{{ _compareTimestampDefinition() /** * Obtain an array of changes that may need to applied to an timestamp field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareTimestampDefinition($current, $previous) { return array(); } // }}} // {{{ _compareBooleanDefinition() /** * Obtain an array of changes that may need to applied to an boolean field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareBooleanDefinition($current, $previous) { return array(); } // }}} // {{{ _compareFloatDefinition() /** * Obtain an array of changes that may need to applied to an float field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareFloatDefinition($current, $previous) { return array(); } // }}} // {{{ _compareDecimalDefinition() /** * Obtain an array of changes that may need to applied to an decimal field * * @param array $current new definition * @param array $previous old definition * @return array containing all changes that will need to be applied * @access protected */ function _compareDecimalDefinition($current, $previous) { return array(); } // }}} // {{{ quote() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param string $type type to which the value should be converted to * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access public */ function quote($value, $type = null, $quote = true, $escape_wildcards = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (is_null($value) || ($value === '' && $db->options['portability'] & MDB2_PORTABILITY_EMPTY_TO_NULL) ) { if (!$quote) { return null; } return 'NULL'; } if (is_null($type)) { switch (gettype($value)) { case 'integer': $type = 'integer'; break; case 'double': // todo: default to decimal as float is quite unusual // $type = 'float'; $type = 'decimal'; break; case 'boolean': $type = 'boolean'; break; case 'array': $value = serialize($value); case 'object': $type = 'text'; break; default: if (preg_match('/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/', $value)) { $type = 'timestamp'; } elseif (preg_match('/^\d{2}:\d{2}$/', $value)) { $type = 'time'; } elseif (preg_match('/^\d{4}-\d{2}-\d{2}$/', $value)) { $type = 'date'; } else { $type = 'text'; } break; } } elseif (!empty($db->options['datatype_map'][$type])) { $type = $db->options['datatype_map'][$type]; if (!empty($db->options['datatype_map_callback'][$type])) { $parameter = array('type' => $type, 'value' => $value, 'quote' => $quote, 'escape_wildcards' => $escape_wildcards); return call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter)); } } if (!method_exists($this, "_quote{$type}")) { return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'type not defined: '.$type, __FUNCTION__); } $value = $this->{"_quote{$type}"}($value, $quote, $escape_wildcards); if ($quote && $escape_wildcards && $db->string_quoting['escape_pattern'] && $db->string_quoting['escape'] !== $db->string_quoting['escape_pattern'] ) { $value.= $this->patternEscapeString(); } return $value; } // }}} // {{{ _quoteInteger() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteInteger($value, $quote, $escape_wildcards) { return (int)$value; } // }}} // {{{ _quoteText() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that already contains any DBMS specific * escaped character sequences. * @access protected */ function _quoteText($value, $quote, $escape_wildcards) { if (!$quote) { return $value; } $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $value = $db->escape($value, $escape_wildcards); return "'".$value."'"; } // }}} // {{{ _readFile() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _readFile($value) { $close = false; if (preg_match('/^(\w+:\/\/)(.*)$/', $value, $match)) { $close = true; if ($match[1] == 'file://') { $value = $match[2]; } $value = @fopen($value, 'r'); } if (is_resource($value)) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $fp = $value; $value = ''; while (!@feof($fp)) { $value.= @fread($fp, $db->options['lob_buffer_length']); } if ($close) { @fclose($fp); } } return $value; } // }}} // {{{ _quoteLOB() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteLOB($value, $quote, $escape_wildcards) { $value = $this->_readFile($value); return $this->_quoteText($value, $quote, $escape_wildcards); } // }}} // {{{ _quoteCLOB() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteCLOB($value, $quote, $escape_wildcards) { return $this->_quoteLOB($value, $quote, $escape_wildcards); } // }}} // {{{ _quoteBLOB() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteBLOB($value, $quote, $escape_wildcards) { return $this->_quoteLOB($value, $quote, $escape_wildcards); } // }}} // {{{ _quoteBoolean() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteBoolean($value, $quote, $escape_wildcards) { return ($value ? 1 : 0); } // }}} // {{{ _quoteDate() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteDate($value, $quote, $escape_wildcards) { if ($value === 'CURRENT_DATE') { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) { return $db->function->now('date'); } return 'CURRENT_DATE'; } return $this->_quoteText($value, $quote, $escape_wildcards); } // }}} // {{{ _quoteTimestamp() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteTimestamp($value, $quote, $escape_wildcards) { if ($value === 'CURRENT_TIMESTAMP') { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) { return $db->function->now('timestamp'); } return 'CURRENT_TIMESTAMP'; } return $this->_quoteText($value, $quote, $escape_wildcards); } // }}} // {{{ _quoteTime() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteTime($value, $quote, $escape_wildcards) { if ($value === 'CURRENT_TIME') { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) { return $db->function->now('time'); } return 'CURRENT_TIME'; } return $this->_quoteText($value, $quote, $escape_wildcards); } // }}} // {{{ _quoteFloat() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteFloat($value, $quote, $escape_wildcards) { if (preg_match('/^(.*)e([-+])(\d+)$/i', $value, $matches)) { $decimal = $this->_quoteDecimal($matches[1], $quote, $escape_wildcards); $sign = $matches[2]; $exponent = str_pad($matches[3], 2, '0', STR_PAD_LEFT); $value = $decimal.'E'.$sign.$exponent; } else { $value = $this->_quoteDecimal($value, $quote, $escape_wildcards); } return $value; } // }}} // {{{ _quoteDecimal() /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string $value text string value that is intended to be converted. * @param bool $quote determines if the value should be quoted and escaped * @param bool $escape_wildcards if to escape escape wildcards * @return string text string that represents the given argument value in * a DBMS specific format. * @access protected */ function _quoteDecimal($value, $quote, $escape_wildcards) { $value = (string)$value; if (preg_match('/[^.0-9]/', $value)) { if (strpos($value, ',')) { // 1000,00 if (!strpos($value, '.')) { // convert the last "," to a "." $value = strrev(str_replace(',', '.', strrev($value))); // 1.000,00 } elseif (strpos($value, '.') && strpos($value, '.') < strpos($value, ',')) { $value = str_replace('.', '', $value); // convert the last "," to a "." $value = strrev(str_replace(',', '.', strrev($value))); // 1,000.00 } else { $value = str_replace(',', '', $value); } } } return $value; } // }}} // {{{ writeLOBToFile() /** * retrieve LOB from the database * * @param resource $lob stream handle * @param string $file name of the file into which the LOb should be fetched * @return mixed MDB2_OK on success, a MDB2 error on failure * @access protected */ function writeLOBToFile($lob, $file) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (preg_match('/^(\w+:\/\/)(.*)$/', $file, $match)) { if ($match[1] == 'file://') { $file = $match[2]; } } $fp = @fopen($file, 'wb'); while (!@feof($lob)) { $result = @fread($lob, $db->options['lob_buffer_length']); $read = strlen($result); if (@fwrite($fp, $result, $read) != $read) { @fclose($fp); return $db->raiseError(MDB2_ERROR, null, null, 'could not write to the output file', __FUNCTION__); } } @fclose($fp); return MDB2_OK; } // }}} // {{{ _retrieveLOB() /** * retrieve LOB from the database * * @param array $lob array * @return mixed MDB2_OK on success, a MDB2 error on failure * @access protected */ function _retrieveLOB(&$lob) { if (is_null($lob['value'])) { $lob['value'] = $lob['resource']; } $lob['loaded'] = true; return MDB2_OK; } // }}} // {{{ readLOB() /** * Read data from large object input stream. * * @param resource $lob stream handle * @param string $data reference to a variable that will hold data * to be read from the large object input stream * @param integer $length value that indicates the largest ammount ofdata * to be read from the large object input stream. * @return mixed the effective number of bytes read from the large object * input stream on sucess or an MDB2 error object. * @access public * @see endOfLOB() */ function _readLOB($lob, $length) { return substr($lob['value'], $lob['position'], $length); } // }}} // {{{ _endOfLOB() /** * Determine whether it was reached the end of the large object and * therefore there is no more data to be read for the its input stream. * * @param array $lob array * @return mixed true or false on success, a MDB2 error on failure * @access protected */ function _endOfLOB($lob) { return $lob['endOfLOB']; } // }}} // {{{ destroyLOB() /** * Free any resources allocated during the lifetime of the large object * handler object. * * @param resource $lob stream handle * @access public */ function destroyLOB($lob) { $lob_data = stream_get_meta_data($lob); $lob_index = $lob_data['wrapper_data']->lob_index; fclose($lob); if (isset($this->lobs[$lob_index])) { $this->_destroyLOB($this->lobs[$lob_index]); unset($this->lobs[$lob_index]); } return MDB2_OK; } // }}} // {{{ _destroyLOB() /** * Free any resources allocated during the lifetime of the large object * handler object. * * @param array $lob array * @access private */ function _destroyLOB(&$lob) { return MDB2_OK; } // }}} // {{{ implodeArray() /** * apply a type to all values of an array and return as a comma seperated string * useful for generating IN statements * * @access public * * @param array $array data array * @param string $type determines type of the field * * @return string comma seperated values */ function implodeArray($array, $type = false) { if (!is_array($array) || empty($array)) { return 'NULL'; } if ($type) { foreach ($array as $value) { $return[] = $this->quote($value, $type); } } else { $return = $array; } return implode(', ', $return); } // }}} // {{{ matchPattern() /** * build a pattern matching string * * EXPERIMENTAL * * WARNING: this function is experimental and may change signature at * any time until labelled as non-experimental * * @access public * * @param array $pattern even keys are strings, odd are patterns (% and _) * @param string $operator optional pattern operator (LIKE, ILIKE and maybe others in the future) * @param string $field optional field name that is being matched against * (might be required when emulating ILIKE) * * @return string SQL pattern */ function matchPattern($pattern, $operator = null, $field = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $match = ''; if (!is_null($operator)) { $operator = strtoupper($operator); switch ($operator) { // case insensitive case 'ILIKE': if (is_null($field)) { return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'case insensitive LIKE matching requires passing the field name', __FUNCTION__); } $db->loadModule('Function', null, true); $match = $db->function->lower($field).' '.'LIKE '; break; // case sensitive case 'LIKE': $match = is_null($field) ? 'LIKE ' : $field.' LIKE '; break; default: return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'not a supported operator type:'. $operator, __FUNCTION__); } } $match.= "'"; foreach ($pattern as $key => $value) { if ($key % 2) { $match.= $value; } else { if ($operator === 'ILIKE') { $value = strtolower($value); } $match.= $db->escapePattern($db->escape($value)); } } $match.= "'"; $match.= $this->patternEscapeString(); return $match; } // }}} // {{{ patternEscapeString() /** * build string to define pattern escape character * * EXPERIMENTAL * * WARNING: this function is experimental and may change signature at * any time until labelled as non-experimental * * @access public * * @return string define pattern escape character */ function patternEscapeString() { return ''; } // }}} // {{{ mapNativeDatatype() /** * Maps a native array description of a field to a MDB2 datatype and length * * @param array $field native field description * @return array containing the various possible types, length, sign, fixed * @access public */ function mapNativeDatatype($field) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ mapPrepareDatatype() /** * Maps an mdb2 datatype to mysqli prepare type * * @param string $type * @return string * @access public */ function mapPrepareDatatype($type) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!empty($db->options['datatype_map'][$type])) { $type = $db->options['datatype_map'][$type]; if (!empty($db->options['datatype_map_callback'][$type])) { $parameter = array('type' => $type); return call_user_func_array($db->options['datatype_map_callback'][$type], array(&$db, __FUNCTION__, $parameter)); } } return $type; } } ?>catalog/libs/PEAR/MDB2/Driver/Function/0000755577340101002240000000000010625430035021337 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/MDB2/Driver/Function/Common.php0000644577340101002240000001651710625430035023312 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Common.php,v 1.16 2006/08/07 20:15:21 lsmith Exp $ // /** * @package MDB2 * @category Database * @author Lukas Smith */ /** * Base class for the function modules that is extended by each MDB2 driver * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Driver_Function_Common extends MDB2_Module_Common { // {{{ executeStoredProc() /** * Execute a stored procedure and return any results * * @param string $name string that identifies the function to execute * @param mixed $params array that contains the paramaters to pass the stored proc * @param mixed $types array that contains the types of the columns in * the result set * @param mixed $result_class string which specifies which result class to use * @param mixed $result_wrap_class string which specifies which class to wrap results in * @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure * @access public */ function &executeStoredProc($name, $params = null, $types = null, $result_class = true, $result_wrap_class = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); return $error; } // }}} // {{{ functionTable() /** * return string for internal table used when calling only a function * * @return string for internal table used when calling only a function * @access public */ function functionTable() { return ''; } // }}} // {{{ now() /** * Return string to call a variable with the current timestamp inside an SQL statement * There are three special variables for current date and time: * - CURRENT_TIMESTAMP (date and time, TIMESTAMP type) * - CURRENT_DATE (date, DATE type) * - CURRENT_TIME (time, TIME type) * * @return string to call a variable with the current timestamp * @access public */ function now($type = 'timestamp') { switch ($type) { case 'time': return 'CURRENT_TIME'; case 'date': return 'CURRENT_DATE'; case 'timestamp': default: return 'CURRENT_TIMESTAMP'; } } // }}} // {{{ substring() /** * return string to call a function to get a substring inside an SQL statement * * @return string to call a function to get a substring * @access public */ function substring($value, $position = 1, $length = null) { if (!is_null($length)) { return "SUBSTRING($value FROM $position FOR $length)"; } return "SUBSTRING($value FROM $position)"; } // }}} // {{{ concat() /** * Returns string to concatenate two or more string parameters * * @param string $value1 * @param string $value2 * @param string $values... * @return string to concatenate two strings * @access public */ function concat($value1, $value2) { $args = func_get_args(); return "(".implode(' || ', $args).")"; } // }}} // {{{ random() /** * return string to call a function to get random value inside an SQL statement * * @return return string to generate float between 0 and 1 * @access public */ function random() { return 'RAND()'; } // }}} // {{{ lower() /** * return string to call a function to lower the case of an expression * * @param string $expression * @return return string to lower case of an expression * @access public */ function lower($expression) { return "LOWER($expression)"; } // }}} // {{{ upper() /** * return string to call a function to upper the case of an expression * * @param string $expression * @return return string to upper case of an expression * @access public */ function upper($expression) { return "UPPER($expression)"; } // }}} } ?>catalog/libs/PEAR/MDB2/Driver/Manager/0000755577340101002240000000000010625430037021126 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/MDB2/Driver/Manager/Common.php0000644577340101002240000007400210625430041023065 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Common.php,v 1.58 2006/09/26 13:57:11 quipo Exp $ // /** * @package MDB2 * @category Database * @author Lukas Smith */ /** * Base class for the management modules that is extended by each MDB2 driver * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Driver_Manager_Common extends MDB2_Module_Common { // }}} // {{{ getFieldDeclarationList() /** * Get declaration of a number of field in bulk * * @param string $fields a multidimensional associative array. * The first dimension determines the field name, while the second * dimension is keyed with the name of the properties * of the field being declared as array indexes. Currently, the types * of supported field properties are as follows: * * default * Boolean value to be used as default for this field. * * notnull * Boolean flag that indicates whether this field is constrained * to not be set to null. * * @return mixed string on success, a MDB2 error on failure * @access public */ function getFieldDeclarationList($fields) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!is_array($fields) || empty($fields)) { return $db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'missing any fields', __FUNCTION__); } foreach ($fields as $field_name => $field) { $query = $db->getDeclaration($field['type'], $field_name, $field); if (PEAR::isError($query)) { return $query; } $query_fields[] = $query; } return implode(', ', $query_fields); } // }}} // {{{ _fixSequenceName() /** * Removes any formatting in an sequence name using the 'seqname_format' option * * @param string $sqn string that containts name of a potential sequence * @param bool $check if only formatted sequences should be returned * @return string name of the sequence with possible formatting removed * @access protected */ function _fixSequenceName($sqn, $check = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $seq_pattern = '/^'.preg_replace('/%s/', '([a-z0-9_]+)', $db->options['seqname_format']).'$/i'; $seq_name = preg_replace($seq_pattern, '\\1', $sqn); if ($seq_name && !strcasecmp($sqn, $db->getSequenceName($seq_name))) { return $seq_name; } if ($check) { return false; } return $sqn; } // }}} // {{{ _fixIndexName() /** * Removes any formatting in an index name using the 'idxname_format' option * * @param string $idx string that containts name of anl index * @return string name of the index with possible formatting removed * @access protected */ function _fixIndexName($idx) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $idx_pattern = '/^'.preg_replace('/%s/', '([a-z0-9_]+)', $db->options['idxname_format']).'$/i'; $idx_name = preg_replace($idx_pattern, '\\1', $idx); if ($idx_name && !strcasecmp($idx, $db->getIndexName($idx_name))) { return $idx_name; } return $idx; } // }}} // {{{ createDatabase() /** * create a new database * * @param string $name name of the database that should be created * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function createDatabase($database) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ dropDatabase() /** * drop an existing database * * @param string $name name of the database that should be dropped * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function dropDatabase($database) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ /** * Create a basic SQL query for a new table creation * @param string $name Name of the database that should be created * @param array $fields Associative array that contains the definition of each field of the new table * @param array $options An associative array of table options * @return mixed string (the SQL query) on success, a MDB2 error on failure * @see createTable() */ function _getCreateTableQuery($name, $fields, $options = array()) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!$name) { return $db->raiseError(MDB2_ERROR_CANNOT_CREATE, null, null, 'no valid table name specified', __FUNCTION__); } if (empty($fields)) { return $db->raiseError(MDB2_ERROR_CANNOT_CREATE, null, null, 'no fields specified for table "'.$name.'"', __FUNCTION__); } $query_fields = $this->getFieldDeclarationList($fields); if (PEAR::isError($query_fields)) { return $query_fields; } if (!empty($options['primary'])) { $query_fields.= ', PRIMARY KEY ('.implode(', ', array_keys($options['primary'])).')'; } $name = $db->quoteIdentifier($name, true); return "CREATE TABLE $name ($query_fields)"; } // }}} // {{{ createTable() /** * create a new table * * @param string $name Name of the database that should be created * @param array $fields Associative array that contains the definition of each field of the new table * The indexes of the array entries are the names of the fields of the table an * the array entry values are associative arrays like those that are meant to be * passed with the field definitions to get[Type]Declaration() functions. * array( * 'id' => array( * 'type' => 'integer', * 'unsigned' => 1 * 'notnull' => 1 * 'default' => 0 * ), * 'name' => array( * 'type' => 'text', * 'length' => 12 * ), * 'password' => array( * 'type' => 'text', * 'length' => 12 * ) * ); * @param array $options An associative array of table options: * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function createTable($name, $fields, $options = array()) { $query = $this->_getCreateTableQuery($name, $fields, $options); if (PEAR::isError($query)) { return $query; } $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->exec($query); } // }}} // {{{ dropTable() /** * drop an existing table * * @param string $name name of the table that should be dropped * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function dropTable($name) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $name = $db->quoteIdentifier($name, true); return $db->exec("DROP TABLE $name"); } // }}} // {{{ alterTable() /** * alter an existing table * * @param string $name name of the table that is intended to be changed. * @param array $changes associative array that contains the details of each type * of change that is intended to be performed. The types of * changes that are currently supported are defined as follows: * * name * * New name for the table. * * add * * Associative array with the names of fields to be added as * indexes of the array. The value of each entry of the array * should be set to another associative array with the properties * of the fields to be added. The properties of the fields should * be the same as defined by the MDB2 parser. * * * remove * * Associative array with the names of fields to be removed as indexes * of the array. Currently the values assigned to each entry are ignored. * An empty array should be used for future compatibility. * * rename * * Associative array with the names of fields to be renamed as indexes * of the array. The value of each entry of the array should be set to * another associative array with the entry named name with the new * field name and the entry named Declaration that is expected to contain * the portion of the field declaration already in DBMS specific SQL code * as it is used in the CREATE TABLE statement. * * change * * Associative array with the names of the fields to be changed as indexes * of the array. Keep in mind that if it is intended to change either the * name of a field and any other properties, the change array entries * should have the new names of the fields as array indexes. * * The value of each entry of the array should be set to another associative * array with the properties of the fields to that are meant to be changed as * array entries. These entries should be assigned to the new values of the * respective properties. The properties of the fields should be the same * as defined by the MDB2 parser. * * Example * array( * 'name' => 'userlist', * 'add' => array( * 'quota' => array( * 'type' => 'integer', * 'unsigned' => 1 * ) * ), * 'remove' => array( * 'file_limit' => array(), * 'time_limit' => array() * ), * 'change' => array( * 'name' => array( * 'length' => '20', * 'definition' => array( * 'type' => 'text', * 'length' => 20, * ), * ) * ), * 'rename' => array( * 'sex' => array( * 'name' => 'gender', * 'definition' => array( * 'type' => 'text', * 'length' => 1, * 'default' => 'M', * ), * ) * ) * ) * * @param boolean $check indicates whether the function should just check if the DBMS driver * can perform the requested table alterations if the value is true or * actually perform them otherwise. * @access public * * @return mixed MDB2_OK on success, a MDB2 error on failure */ function alterTable($name, $changes, $check) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listDatabases() /** * list all databases * * @return mixed data array on success, a MDB2 error on failure * @access public */ function listDatabases() { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implementedd', __FUNCTION__); } // }}} // {{{ listUsers() /** * list all users * * @return mixed data array on success, a MDB2 error on failure * @access public */ function listUsers() { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listViews() /** * list all views in the current database * * @param string database, the current is default * @return mixed data array on success, a MDB2 error on failure * @access public */ function listViews($database = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listTableViews() /** * list the views in the database that reference a given table * * @param string table for which all references views should be found * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public **/ function listTableViews($table) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listTableTriggers() /** * This function will be called to get all triggers of the * current database ($db->getDatabase()) * * @access public * @param string $table The name of the table from the * previous database to query against. * @return mixed Array on success or MDB2 error on failure */ function listTableTriggers($table = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listFunctions() /** * list all functions in the current database * * @return mixed data array on success, a MDB2 error on failure * @access public */ function listFunctions() { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listTables() /** * list all tables in the current database * * @param string database, the current is default * @return mixed data array on success, a MDB2 error on failure * @access public */ function listTables($database = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listTableFields() /** * list all fields in a tables in the current database * * @param string $table name of table that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function listTableFields($table) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ createIndex() /** * Get the stucture of a field into an array * * @param string $table name of the table on which the index is to be created * @param string $name name of the index to be created * @param array $definition associative array that defines properties of the index to be created. * Currently, only one property named FIELDS is supported. This property * is also an associative with the names of the index fields as array * indexes. Each entry of this array is set to another type of associative * array that specifies properties of the index that are specific to * each field. * * Currently, only the sorting property is supported. It should be used * to define the sorting direction of the index. It may be set to either * ascending or descending. * * Not all DBMS support index sorting direction configuration. The DBMS * drivers of those that do not support it ignore this property. Use the * function supports() to determine whether the DBMS driver can manage indexes. * * Example * array( * 'fields' => array( * 'user_name' => array( * 'sorting' => 'ascending' * ), * 'last_login' => array() * ) * ) * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function createIndex($table, $name, $definition) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $table = $db->quoteIdentifier($table, true); $name = $db->quoteIdentifier($db->getIndexName($name), true); $query = "CREATE INDEX $name ON $table"; $fields = array(); foreach (array_keys($definition['fields']) as $field) { $fields[] = $db->quoteIdentifier($field, true); } $query .= ' ('. implode(', ', $fields) . ')'; return $db->exec($query); } // }}} // {{{ dropIndex() /** * drop existing index * * @param string $table name of table that should be used in method * @param string $name name of the index to be dropped * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function dropIndex($table, $name) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $name = $db->quoteIdentifier($db->getIndexName($name), true); return $db->exec("DROP INDEX $name"); } // }}} // {{{ listTableIndexes() /** * list all indexes in a table * * @param string $table name of table that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function listTableIndexes($table) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ createConstraint() /** * create a constraint on a table * * @param string $table name of the table on which the constraint is to be created * @param string $name name of the constraint to be created * @param array $definition associative array that defines properties of the constraint to be created. * Currently, only one property named FIELDS is supported. This property * is also an associative with the names of the constraint fields as array * constraints. Each entry of this array is set to another type of associative * array that specifies properties of the constraint that are specific to * each field. * * Example * array( * 'fields' => array( * 'user_name' => array(), * 'last_login' => array() * ) * ) * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function createConstraint($table, $name, $definition) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $table = $db->quoteIdentifier($table, true); $name = $db->quoteIdentifier($db->getIndexName($name), true); $query = "ALTER TABLE $table ADD CONSTRAINT $name"; if (!empty($definition['primary'])) { $query.= ' PRIMARY KEY'; } elseif (!empty($definition['unique'])) { $query.= ' UNIQUE'; } $fields = array(); foreach (array_keys($definition['fields']) as $field) { $fields[] = $db->quoteIdentifier($field, true); } $query .= ' ('. implode(', ', $fields) . ')'; return $db->exec($query); } // }}} // {{{ dropConstraint() /** * drop existing constraint * * @param string $table name of table that should be used in method * @param string $name name of the constraint to be dropped * @param string $primary hint if the constraint is primary * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function dropConstraint($table, $name, $primary = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $table = $db->quoteIdentifier($table, true); $name = $db->quoteIdentifier($db->getIndexName($name), true); return $db->exec("ALTER TABLE $table DROP CONSTRAINT $name"); } // }}} // {{{ listTableConstraints() /** * list all constraints in a table * * @param string $table name of table that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function listTableConstraints($table) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ createSequence() /** * create sequence * * @param string $seq_name name of the sequence to be created * @param string $start start value of the sequence; default is 1 * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function createSequence($seq_name, $start = 1) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ dropSequence() /** * drop existing sequence * * @param string $seq_name name of the sequence to be dropped * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function dropSequence($name) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ listSequences() /** * list all sequences in the current database * * @param string database, the current is default * @return mixed data array on success, a MDB2 error on failure * @access public */ function listSequences($database = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } } ?> catalog/libs/PEAR/MDB2/Driver/Native/0000755577340101002240000000000010625430041020775 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/MDB2/Driver/Native/Common.php0000644577340101002240000000665310625430041022750 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Common.php,v 1.1 2006/06/18 21:59:05 lsmith Exp $ // /** * Base class for the natuve modules that is extended by each MDB2 driver * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Driver_Native_Common extends MDB2_Module_Common { } ?>catalog/libs/PEAR/MDB2/Driver/Reverse/0000755577340101002240000000000010625430043021164 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/MDB2/Driver/Reverse/Common.php0000644577340101002240000003626410625430044023141 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Common.php,v 1.28 2006/08/15 11:24:51 lsmith Exp $ // /** * @package MDB2 * @category Database */ /** * These are constants for the tableInfo-function * they are bitwised or'ed. so if there are more constants to be defined * in the future, adjust MDB2_TABLEINFO_FULL accordingly */ define('MDB2_TABLEINFO_ORDER', 1); define('MDB2_TABLEINFO_ORDERTABLE', 2); define('MDB2_TABLEINFO_FULL', 3); /** * Base class for the schema reverse engineering module that is extended by each MDB2 driver * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Driver_Reverse_Common extends MDB2_Module_Common { // }}} // {{{ getTableFieldDefinition() /** * Get the stucture of a field into an array * * @param string $table name of table that should be used in method * @param string $fields name of field that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function getTableFieldDefinition($table, $field) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ getTableIndexDefinition() /** * Get the stucture of an index into an array * * @param string $table name of table that should be used in method * @param string $index name of index that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function getTableIndexDefinition($table, $index) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ getTableConstraintDefinition() /** * Get the stucture of an constraints into an array * * @param string $table name of table that should be used in method * @param string $index name of index that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function getTableConstraintDefinition($table, $index) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ getSequenceDefinition() /** * Get the stucture of a sequence into an array * * @param string $sequence name of sequence that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function getSequenceDefinition($sequence) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $start = $db->currId($sequence); if (PEAR::isError($start)) { return $start; } if ($db->supports('current_id')) { $start++; } else { $db->warnings[] = 'database does not support getting current sequence value, the sequence value was incremented'; } $definition = array(); if ($start != 1) { $definition = array('start' => $start); } return $definition; } // }}} // {{{ getTriggerDefinition() /** * Get the stucture of an trigger into an array * * @param string $trigger name of trigger that should be used in method * @return mixed data array on success, a MDB2 error on failure * @access public */ function getTriggerDefinition($trigger) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ tableInfo() /** * Returns information about a table or a result set * * The format of the resulting array depends on which $mode * you select. The sample output below is based on this query: *
         *    SELECT tblFoo.fldID, tblFoo.fldPhone, tblBar.fldId
         *    FROM tblFoo
         *    JOIN tblBar ON tblFoo.fldId = tblBar.fldId
         * 
    * *
      *
    • * * null (default) *
           *   [0] => Array (
           *       [table] => tblFoo
           *       [name] => fldId
           *       [type] => int
           *       [len] => 11
           *       [flags] => primary_key not_null
           *   )
           *   [1] => Array (
           *       [table] => tblFoo
           *       [name] => fldPhone
           *       [type] => string
           *       [len] => 20
           *       [flags] =>
           *   )
           *   [2] => Array (
           *       [table] => tblBar
           *       [name] => fldId
           *       [type] => int
           *       [len] => 11
           *       [flags] => primary_key not_null
           *   )
           *   
      * *
    • * * MDB2_TABLEINFO_ORDER * *

      In addition to the information found in the default output, * a notation of the number of columns is provided by the * num_fields element while the order * element provides an array with the column names as the keys and * their location index number (corresponding to the keys in the * the default output) as the values.

      * *

      If a result set has identical field names, the last one is * used.

      * *
           *   [num_fields] => 3
           *   [order] => Array (
           *       [fldId] => 2
           *       [fldTrans] => 1
           *   )
           *   
      * *
    • * * MDB2_TABLEINFO_ORDERTABLE * *

      Similar to MDB2_TABLEINFO_ORDER but adds more * dimensions to the array in which the table names are keys and * the field names are sub-keys. This is helpful for queries that * join tables which have identical field names.

      * *
           *   [num_fields] => 3
           *   [ordertable] => Array (
           *       [tblFoo] => Array (
           *           [fldId] => 0
           *           [fldPhone] => 1
           *       )
           *       [tblBar] => Array (
           *           [fldId] => 2
           *       )
           *   )
           *   
      * *
    • *
    * * The flags element contains a space separated list * of extra information about the field. This data is inconsistent * between DBMS's due to the way each DBMS works. * + primary_key * + unique_key * + multiple_key * + not_null * * Most DBMS's only provide the table and flags * elements if $result is a table name. The following DBMS's * provide full information from queries: * + fbsql * + mysql * * If the 'portability' option has MDB2_PORTABILITY_FIX_CASE * turned on, the names of tables and fields will be lower or upper cased. * * @param object|string $result MDB2_result object from a query or a * string containing the name of a table. * While this also accepts a query result * resource identifier, this behavior is * deprecated. * @param int $mode either unused or one of the tableInfo modes: * MDB2_TABLEINFO_ORDERTABLE, * MDB2_TABLEINFO_ORDER or * MDB2_TABLEINFO_FULL (which does both). * These are bitwise, so the first two can be * combined using |. * * @return array an associative array with the information requested. * A MDB2_Error object on failure. * * @see MDB2_Driver_Common::setOption() */ function tableInfo($result, $mode = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!is_string($result)) { return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } $db->loadModule('Manager', null, true); $fields = $db->manager->listTableFields($result); if (PEAR::isError($fields)) { return $fields; } $flags = array(); $idxname_format = $db->getOption('idxname_format'); $db->setOption('idxname_format', '%s'); $indexes = $db->manager->listTableIndexes($result); if (PEAR::isError($indexes)) { $db->setOption('idxname_format', $idxname_format); return $indexes; } foreach ($indexes as $index) { $definition = $this->getTableIndexDefinition($result, $index); if (PEAR::isError($definition)) { $db->setOption('idxname_format', $idxname_format); return $definition; } if (count($definition['fields']) > 1) { foreach ($definition['fields'] as $field => $sort) { $flags[$field] = 'multiple_key'; } } } $constraints = $db->manager->listTableConstraints($result); if (PEAR::isError($constraints)) { return $constraints; } foreach ($constraints as $constraint) { $definition = $this->getTableConstraintDefinition($result, $constraint); if (PEAR::isError($definition)) { $db->setOption('idxname_format', $idxname_format); return $definition; } $flag = !empty($definition['primary']) ? 'primary_key' : (!empty($definition['unique']) ? 'unique_key' : false); if ($flag) { foreach ($definition['fields'] as $field => $sort) { if (empty($flags[$field]) || $flags[$field] != 'primary_key') { $flags[$field] = $flag; } } } } if ($mode) { $res['num_fields'] = count($fields); } foreach ($fields as $i => $field) { $definition = $this->getTableFieldDefinition($result, $field); if (PEAR::isError($definition)) { $db->setOption('idxname_format', $idxname_format); return $definition; } $res[$i] = $definition[0]; $res[$i]['name'] = $field; $res[$i]['table'] = $result; $res[$i]['type'] = preg_replace('/^([a-z]+).*$/i', '\\1', trim($definition[0]['nativetype'])); // 'primary_key', 'unique_key', 'multiple_key' $res[$i]['flags'] = empty($flags[$field]) ? '' : $flags[$field]; // not_null', 'unsigned', 'auto_increment', 'default_[rawencodedvalue]' if (!empty($res[$i]['notnull'])) { $res[$i]['flags'].= ' not_null'; } if (!empty($res[$i]['unsigned'])) { $res[$i]['flags'].= ' unsigned'; } if (!empty($res[$i]['auto_increment'])) { $res[$i]['flags'].= ' autoincrement'; } if (!empty($res[$i]['default'])) { $res[$i]['flags'].= ' default_'.rawurlencode($res[$i]['default']); } if ($mode & MDB2_TABLEINFO_ORDER) { $res['order'][$res[$i]['name']] = $i; } if ($mode & MDB2_TABLEINFO_ORDERTABLE) { $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i; } } $db->setOption('idxname_format', $idxname_format); return $res; } } ?>catalog/libs/PEAR/MDB2/Date.php0000644577340101002240000001442510625430032017710 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Date.php,v 1.10 2006/03/01 12:15:32 lsmith Exp $ // /** * @package MDB2 * @category Database * @author Lukas Smith */ /** * Several methods to convert the MDB2 native timestamp format (ISO based) * to and from data structures that are convenient to worth with in side of php. * For more complex date arithmetic please take a look at the Date package in PEAR * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Date { // {{{ mdbNow() /** * return the current datetime * * @return string current datetime in the MDB2 format * @access public */ function mdbNow() { return date('Y-m-d H:i:s'); } // }}} // {{{ mdbToday() /** * return the current date * * @return string current date in the MDB2 format * @access public */ function mdbToday() { return date('Y-m-d'); } // }}} // {{{ mdbTime() /** * return the current time * * @return string current time in the MDB2 format * @access public */ function mdbTime() { return date('H:i:s'); } // }}} // {{{ date2Mdbstamp() /** * convert a date into a MDB2 timestamp * * @param int hour of the date * @param int minute of the date * @param int second of the date * @param int month of the date * @param int day of the date * @param int year of the date * * @return string a valid MDB2 timestamp * @access public */ function date2Mdbstamp($hour = null, $minute = null, $second = null, $month = null, $day = null, $year = null) { return MDB2_Date::unix2Mdbstamp(mktime($hour, $minute, $second, $month, $day, $year, -1)); } // }}} // {{{ unix2Mdbstamp() /** * convert a unix timestamp into a MDB2 timestamp * * @param int a valid unix timestamp * * @return string a valid MDB2 timestamp * @access public */ function unix2Mdbstamp($unix_timestamp) { return date('Y-m-d H:i:s', $unix_timestamp); } // }}} // {{{ mdbstamp2Unix() /** * convert a MDB2 timestamp into a unix timestamp * * @param int a valid MDB2 timestamp * @return string unix timestamp with the time stored in the MDB2 format * * @access public */ function mdbstamp2Unix($mdb_timestamp) { $arr = MDB2_Date::mdbstamp2Date($mdb_timestamp); return mktime($arr['hour'], $arr['minute'], $arr['second'], $arr['month'], $arr['day'], $arr['year'], -1); } // }}} // {{{ mdbstamp2Date() /** * convert a MDB2 timestamp into an array containing all * values necessary to pass to php's date() function * * @param int a valid MDB2 timestamp * * @return array with the time split * @access public */ function mdbstamp2Date($mdb_timestamp) { list($arr['year'], $arr['month'], $arr['day'], $arr['hour'], $arr['minute'], $arr['second']) = sscanf($mdb_timestamp, "%04u-%02u-%02u %02u:%02u:%02u"); return $arr; } // }}} } ?> catalog/libs/PEAR/MDB2/Extended.php0000644577340101002240000006253610625430043020603 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Extended.php,v 1.57 2006/10/09 17:09:19 davidc Exp $ /** * @package MDB2 * @category Database * @author Lukas Smith */ /** * Used by autoPrepare() */ define('MDB2_AUTOQUERY_INSERT', 1); define('MDB2_AUTOQUERY_UPDATE', 2); define('MDB2_AUTOQUERY_DELETE', 3); define('MDB2_AUTOQUERY_SELECT', 4); /** * MDB2_Extended: class which adds several high level methods to MDB2 * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Extended extends MDB2_Module_Common { // {{{ autoPrepare() /** * Generate an insert, update or delete query and call prepare() on it * * @param string table * @param array the fields names * @param int type of query to build * MDB2_AUTOQUERY_INSERT * MDB2_AUTOQUERY_UPDATE * MDB2_AUTOQUERY_DELETE * MDB2_AUTOQUERY_SELECT * @param string (in case of update and delete queries, this string will be put after the sql WHERE statement) * @param array that contains the types of the placeholders * @param mixed array that contains the types of the columns in * the result set or MDB2_PREPARE_RESULT, if set to * MDB2_PREPARE_MANIP the query is handled as a manipulation query * * @return resource handle for the query * @see buildManipSQL * @access public */ function autoPrepare($table, $table_fields, $mode = MDB2_AUTOQUERY_INSERT, $where = false, $types = null, $result_types = MDB2_PREPARE_MANIP) { $query = $this->buildManipSQL($table, $table_fields, $mode, $where); if (PEAR::isError($query)) { return $query; } $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } return $db->prepare($query, $types, $result_types); } // }}} // {{{ autoExecute() /** * Generate an insert, update or delete query and call prepare() and execute() on it * * @param string name of the table * @param array assoc ($key=>$value) where $key is a field name and $value its value * @param int type of query to build * MDB2_AUTOQUERY_INSERT * MDB2_AUTOQUERY_UPDATE * MDB2_AUTOQUERY_DELETE * MDB2_AUTOQUERY_SELECT * @param string (in case of update and delete queries, this string will be put after the sql WHERE statement) * @param array that contains the types of the placeholders * @param string which specifies which result class to use * @param mixed array that contains the types of the columns in * the result set or MDB2_PREPARE_RESULT, if set to * MDB2_PREPARE_MANIP the query is handled as a manipulation query * * @return bool|MDB2_Error true on success, a MDB2 error on failure * @see buildManipSQL * @see autoPrepare * @access public */ function &autoExecute($table, $fields_values, $mode = MDB2_AUTOQUERY_INSERT, $where = false, $types = null, $result_class = true, $result_types = MDB2_PREPARE_MANIP) { $fields_values = (array)$fields_values; if ($mode == MDB2_AUTOQUERY_SELECT) { if (is_array($result_types)) { $keys = array_keys($result_types); } elseif (!empty($fields_values)) { $keys = $fields_values; } else { $keys = array(); } } else { $keys = array_keys($fields_values); } $params = array_values($fields_values); if (empty($params)) { $query = $this->buildManipSQL($table, $keys, $mode, $where); $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if ($mode == MDB2_AUTOQUERY_SELECT) { $result =& $db->query($query, $result_types, $result_class); } else { $result = $db->exec($query); } } else { $stmt = $this->autoPrepare($table, $keys, $mode, $where, $types, $result_types); if (PEAR::isError($stmt)) { return $stmt; } $result =& $stmt->execute($params, $result_class); $stmt->free(); } return $result; } // }}} // {{{ buildManipSQL() /** * Make automaticaly an sql query for prepare() * * Example : buildManipSQL('table_sql', array('field1', 'field2', 'field3'), MDB2_AUTOQUERY_INSERT) * will return the string : INSERT INTO table_sql (field1,field2,field3) VALUES (?,?,?) * NB : - This belongs more to a SQL Builder class, but this is a simple facility * - Be carefull ! If you don't give a $where param with an UPDATE/DELETE query, all * the records of the table will be updated/deleted ! * * @param string name of the table * @param ordered array containing the fields names * @param int type of query to build * MDB2_AUTOQUERY_INSERT * MDB2_AUTOQUERY_UPDATE * MDB2_AUTOQUERY_DELETE * MDB2_AUTOQUERY_SELECT * @param string (in case of update and delete queries, this string will be put after the sql WHERE statement) * * @return string sql query for prepare() * @access public */ function buildManipSQL($table, $table_fields, $mode, $where = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if (!empty($table_fields) && $db->options['quote_identifier']) { foreach ($table_fields as $key => $field) { $table_fields[$key] = $db->quoteIdentifier($field); } } if ($where !== false && !is_null($where)) { if (is_array($where)) { $where = implode(' AND ', $where); } $where = ' WHERE '.$where; } switch ($mode) { case MDB2_AUTOQUERY_INSERT: if (empty($table_fields)) { return $db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'Insert requires table fields', __FUNCTION__); } $cols = implode(', ', $table_fields); $values = '?'.str_repeat(', ?', (count($table_fields) - 1)); return 'INSERT INTO '.$table.' ('.$cols.') VALUES ('.$values.')'; break; case MDB2_AUTOQUERY_UPDATE: if (empty($table_fields)) { return $db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, 'Update requires table fields', __FUNCTION__); } $set = implode(' = ?, ', $table_fields).' = ?'; $sql = 'UPDATE '.$table.' SET '.$set.$where; return $sql; break; case MDB2_AUTOQUERY_DELETE: $sql = 'DELETE FROM '.$table.$where; return $sql; break; case MDB2_AUTOQUERY_SELECT: $cols = !empty($table_fields) ? implode(', ', $table_fields) : '*'; $sql = 'SELECT '.$cols.' FROM '.$table.$where; return $sql; break; } return $db->raiseError(MDB2_ERROR_SYNTAX, null, null, 'Non existant mode', __FUNCTION__); } // }}} // {{{ limitQuery() /** * Generates a limited query * * @param string query * @param array that contains the types of the columns in the result set * @param integer the numbers of rows to fetch * @param integer the row to start to fetching * @param string which specifies which result class to use * @param mixed string which specifies which class to wrap results in * * @return MDB2_Result|MDB2_Error result set on success, a MDB2 error on failure * @access public */ function &limitQuery($query, $types, $limit, $offset = 0, $result_class = true, $result_wrap_class = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } $result = $db->setLimit($limit, $offset); if (PEAR::isError($result)) { return $result; } $result =& $db->query($query, $types, $result_class, $result_wrap_class); return $result; } // }}} // {{{ execParam() /** * Execute a parameterized DML statement. * * @param string the SQL query * @param array if supplied, prepare/execute will be used * with this array as execute parameters * @param array that contains the types of the values defined in $params * * @return int|MDB2_Error affected rows on success, a MDB2 error on failure * @access public */ function execParam($query, $params = array(), $param_types = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } settype($params, 'array'); if (empty($params)) { return $db->exec($query); } $stmt = $db->prepare($query, $param_types, MDB2_PREPARE_MANIP); if (PEAR::isError($stmt)) { return $stmt; } $result = $stmt->execute($params); if (PEAR::isError($result)) { return $result; } $stmt->free(); return $result; } // }}} // {{{ getOne() /** * Fetch the first column of the first row of data returned from a query. * Takes care of doing the query and freeing the results when finished. * * @param string the SQL query * @param string that contains the type of the column in the result set * @param array if supplied, prepare/execute will be used * with this array as execute parameters * @param array that contains the types of the values defined in $params * @param int|string which column to return * * @return scalar|MDB2_Error data on success, a MDB2 error on failure * @access public */ function getOne($query, $type = null, $params = array(), $param_types = null, $colnum = 0) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } settype($params, 'array'); settype($type, 'array'); if (empty($params)) { return $db->queryOne($query, $type, $colnum); } $stmt = $db->prepare($query, $param_types, $type); if (PEAR::isError($stmt)) { return $stmt; } $result = $stmt->execute($params); if (!MDB2::isResultCommon($result)) { return $result; } $one = $result->fetchOne($colnum); $stmt->free(); $result->free(); return $one; } // }}} // {{{ getRow() /** * Fetch the first row of data returned from a query. Takes care * of doing the query and freeing the results when finished. * * @param string the SQL query * @param array that contains the types of the columns in the result set * @param array if supplied, prepare/execute will be used * with this array as execute parameters * @param array that contains the types of the values defined in $params * @param int the fetch mode to use * * @return array|MDB2_Error data on success, a MDB2 error on failure * @access public */ function getRow($query, $types = null, $params = array(), $param_types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } settype($params, 'array'); if (empty($params)) { return $db->queryRow($query, $types, $fetchmode); } $stmt = $db->prepare($query, $param_types, $types); if (PEAR::isError($stmt)) { return $stmt; } $result = $stmt->execute($params); if (!MDB2::isResultCommon($result)) { return $result; } $row = $result->fetchRow($fetchmode); $stmt->free(); $result->free(); return $row; } // }}} // {{{ getCol() /** * Fetch a single column from a result set and return it as an * indexed array. * * @param string the SQL query * @param string that contains the type of the column in the result set * @param array if supplied, prepare/execute will be used * with this array as execute parameters * @param array that contains the types of the values defined in $params * @param int|string which column to return * * @return array|MDB2_Error data on success, a MDB2 error on failure * @access public */ function getCol($query, $type = null, $params = array(), $param_types = null, $colnum = 0) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } settype($params, 'array'); settype($type, 'array'); if (empty($params)) { return $db->queryCol($query, $type, $colnum); } $stmt = $db->prepare($query, $param_types, $type); if (PEAR::isError($stmt)) { return $stmt; } $result = $stmt->execute($params); if (!MDB2::isResultCommon($result)) { return $result; } $col = $result->fetchCol($colnum); $stmt->free(); $result->free(); return $col; } // }}} // {{{ getAll() /** * Fetch all the rows returned from a query. * * @param string the SQL query * @param array that contains the types of the columns in the result set * @param array if supplied, prepare/execute will be used * with this array as execute parameters * @param array that contains the types of the values defined in $params * @param int the fetch mode to use * @param bool if set to true, the $all will have the first * column as its first dimension * @param bool $force_array used only when the query returns exactly * two columns. If true, the values of the returned array will be * one-element arrays instead of scalars. * @param bool $group if true, the values of the returned array is * wrapped in another array. If the same key value (in the first * column) repeats itself, the values will be appended to this array * instead of overwriting the existing values. * * @return array|MDB2_Error data on success, a MDB2 error on failure * @access public */ function getAll($query, $types = null, $params = array(), $param_types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT, $rekey = false, $force_array = false, $group = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } settype($params, 'array'); if (empty($params)) { return $db->queryAll($query, $types, $fetchmode, $rekey, $force_array, $group); } $stmt = $db->prepare($query, $param_types, $types); if (PEAR::isError($stmt)) { return $stmt; } $result = $stmt->execute($params); if (!MDB2::isResultCommon($result)) { return $result; } $all = $result->fetchAll($fetchmode, $rekey, $force_array, $group); $stmt->free(); $result->free(); return $all; } // }}} // {{{ getAssoc() /** * Fetch the entire result set of a query and return it as an * associative array using the first column as the key. * * If the result set contains more than two columns, the value * will be an array of the values from column 2-n. If the result * set contains only two columns, the returned value will be a * scalar with the value of the second column (unless forced to an * array with the $force_array parameter). A MDB2 error code is * returned on errors. If the result set contains fewer than two * columns, a MDB2_ERROR_TRUNCATED error is returned. * * For example, if the table 'mytable' contains: * * ID TEXT DATE * -------------------------------- * 1 'one' 944679408 * 2 'two' 944679408 * 3 'three' 944679408 * * Then the call getAssoc('SELECT id,text FROM mytable') returns: * array( * '1' => 'one', * '2' => 'two', * '3' => 'three', * ) * * ...while the call getAssoc('SELECT id,text,date FROM mytable') returns: * array( * '1' => array('one', '944679408'), * '2' => array('two', '944679408'), * '3' => array('three', '944679408') * ) * * If the more than one row occurs with the same value in the * first column, the last row overwrites all previous ones by * default. Use the $group parameter if you don't want to * overwrite like this. Example: * * getAssoc('SELECT category,id,name FROM mytable', null, null * MDB2_FETCHMODE_ASSOC, false, true) returns: * array( * '1' => array(array('id' => '4', 'name' => 'number four'), * array('id' => '6', 'name' => 'number six') * ), * '9' => array(array('id' => '4', 'name' => 'number four'), * array('id' => '6', 'name' => 'number six') * ) * ) * * Keep in mind that database functions in PHP usually return string * values for results regardless of the database's internal type. * * @param string the SQL query * @param array that contains the types of the columns in the result set * @param array if supplied, prepare/execute will be used * with this array as execute parameters * @param array that contains the types of the values defined in $params * @param bool $force_array used only when the query returns * exactly two columns. If TRUE, the values of the returned array * will be one-element arrays instead of scalars. * @param bool $group if TRUE, the values of the returned array * is wrapped in another array. If the same key value (in the first * column) repeats itself, the values will be appended to this array * instead of overwriting the existing values. * * @return array|MDB2_Error data on success, a MDB2 error on failure * @access public */ function getAssoc($query, $types = null, $params = array(), $param_types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT, $force_array = false, $group = false) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } settype($params, 'array'); if (empty($params)) { return $db->queryAll($query, $types, $fetchmode, true, $force_array, $group); } $stmt = $db->prepare($query, $param_types, $types); if (PEAR::isError($stmt)) { return $stmt; } $result = $stmt->execute($params); if (!MDB2::isResultCommon($result)) { return $result; } $all = $result->fetchAll($fetchmode, true, $force_array, $group); $stmt->free(); $result->free(); return $all; } // }}} // {{{ executeMultiple() /** * This function does several execute() calls on the same statement handle. * $params must be an array indexed numerically from 0, one execute call is * done for every 'row' in the array. * * If an error occurs during execute(), executeMultiple() does not execute * the unfinished rows, but rather returns that error. * * @param resource query handle from prepare() * @param array numeric array containing the data to insert into the query * * @return bool|MDB2_Error true on success, a MDB2 error on failure * @access public * @see prepare(), execute() */ function executeMultiple(&$stmt, $params = null) { for ($i = 0, $j = count($params); $i < $j; $i++) { $result = $stmt->execute($params[$i]); if (PEAR::isError($result)) { return $result; } } return MDB2_OK; } // }}} // {{{ getBeforeID() /** * Returns the next free id of a sequence if the RDBMS * does not support auto increment * * @param string name of the table into which a new row was inserted * @param string name of the field into which a new row was inserted * @param bool when true the sequence is automatic created, if it not exists * @param bool if the returned value should be quoted * * @return int|MDB2_Error id on success, a MDB2 error on failure * @access public */ function getBeforeID($table, $field = null, $ondemand = true, $quote = true) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if ($db->supports('auto_increment') !== true) { $seq = $table.(empty($field) ? '' : '_'.$field); $id = $db->nextID($seq, $ondemand); if (!$quote || PEAR::isError($id)) { return $id; } return $db->quote($id, 'integer'); } elseif (!$quote) { return null; } return 'NULL'; } // }}} // {{{ getAfterID() /** * Returns the autoincrement ID if supported or $id * * @param mixed value as returned by getBeforeId() * @param string name of the table into which a new row was inserted * @param string name of the field into which a new row was inserted * * @return int|MDB2_Error id on success, a MDB2 error on failure * @access public */ function getAfterID($id, $table, $field = null) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { return $db; } if ($db->supports('auto_increment') !== true) { return $id; } return $db->lastInsertID($table, $field); } // }}} } ?> catalog/libs/PEAR/MDB2/Iterator.php0000644577340101002240000001605710625430044020632 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: Iterator.php,v 1.22 2006/05/06 14:03:41 lsmith Exp $ /** * PHP5 Iterator * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Iterator implements Iterator { protected $fetchmode; protected $result; protected $row; // {{{ constructor /** * Constructor */ public function __construct($result, $fetchmode = MDB2_FETCHMODE_DEFAULT) { $this->result = $result; $this->fetchmode = $fetchmode; } // }}} // {{{ seek() /** * Seek forward to a specific row in a result set * * @param int number of the row where the data can be found * * @return void * @access public */ public function seek($rownum) { $this->row = null; if ($this->result) { $this->result->seek($rownum); } } // }}} // {{{ next() /** * Fetch next row of data * * @return void * @access public */ public function next() { $this->row = null; } // }}} // {{{ current() /** * return a row of data * * @return void * @access public */ public function current() { if (is_null($this->row)) { $row = $this->result->fetchRow($this->fetchmode); if (PEAR::isError($row)) { $row = false; } $this->row = $row; } return $this->row; } // }}} // {{{ valid() /** * Check if the end of the result set has been reached * * @return bool true/false, false is also returned on failure * @access public */ public function valid() { return (bool)$this->current(); } // }}} // {{{ free() /** * Free the internal resources associated with result. * * @return bool|MDB2_Error true on success, false|MDB2_Error if result is invalid * @access public */ public function free() { if ($this->result) { return $this->result->free(); } $this->result = false; $this->row = null; return false; } // }}} // {{{ key() /** * Returns the row number * * @return int|bool|MDB2_Error true on success, false|MDB2_Error if result is invalid * @access public */ public function key() { if ($this->result) { return $this->result->rowCount(); } return false; } // }}} // {{{ rewind() /** * Seek to the first row in a result set * * @return void * @access public */ public function rewind() { } // }}} // {{{ destructor /** * Destructor */ public function __destruct() { $this->free(); } // }}} } /** * PHP5 buffered Iterator * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_BufferedIterator extends MDB2_Iterator implements SeekableIterator { // {{{ valid() /** * Check if the end of the result set has been reached * * @return bool|MDB2_Error true on success, false|MDB2_Error if result is invalid * @access public */ public function valid() { if ($this->result) { return $this->result->valid(); } return false; } // }}} // {{{count() /** * Returns the number of rows in a result object * * @return int|MDB2_Error number of rows, false|MDB2_Error if result is invalid * @access public */ public function count() { if ($this->result) { return $this->result->numRows(); } return false; } // }}} // {{{ rewind() /** * Seek to the first row in a result set * * @return void * @access public */ public function rewind() { $this->seek(0); } // }}} } ?>catalog/libs/PEAR/MDB2/LOB.php0000644577340101002240000002017210625430045017447 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: LOB.php,v 1.34 2006/10/25 11:52:21 lsmith Exp $ /** * @package MDB2 * @category Database * @author Lukas Smith */ require_once 'MDB2.php'; /** * MDB2_LOB: user land stream wrapper implementation for LOB support * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_LOB { /** * contains the key to the global MDB2 instance array of the associated * MDB2 instance * * @var integer * @access protected */ var $db_index; /** * contains the key to the global MDB2_LOB instance array of the associated * MDB2_LOB instance * * @var integer * @access protected */ var $lob_index; // {{{ stream_open() /** * open stream * * @param string specifies the URL that was passed to fopen() * @param string the mode used to open the file * @param int holds additional flags set by the streams API * @param string not used * * @return bool * @access public */ function stream_open($path, $mode, $options, &$opened_path) { if (!preg_match('/^rb?\+?$/', $mode)) { return false; } $url = parse_url($path); if (empty($url['host'])) { return false; } $this->db_index = (int)$url['host']; if (!isset($GLOBALS['_MDB2_databases'][$this->db_index])) { return false; } $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; $this->lob_index = (int)$url['user']; if (!isset($db->datatype->lobs[$this->lob_index])) { return false; } return true; } // }}} // {{{ stream_read() /** * read stream * * @param int number of bytes to read * * @return string * @access public */ function stream_read($count) { if (isset($GLOBALS['_MDB2_databases'][$this->db_index])) { $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; $db->datatype->_retrieveLOB($db->datatype->lobs[$this->lob_index]); $data = $db->datatype->_readLOB($db->datatype->lobs[$this->lob_index], $count); $length = strlen($data); if ($length == 0) { $db->datatype->lobs[$this->lob_index]['endOfLOB'] = true; } $db->datatype->lobs[$this->lob_index]['position'] += $length; return $data; } } // }}} // {{{ stream_write() /** * write stream, note implemented * * @param string data * * @return int * @access public */ function stream_write($data) { return 0; } // }}} // {{{ stream_tell() /** * return the current position * * @return int current position * @access public */ function stream_tell() { if (isset($GLOBALS['_MDB2_databases'][$this->db_index])) { $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; return $db->datatype->lobs[$this->lob_index]['position']; } } // }}} // {{{ stream_eof() /** * Check if stream reaches EOF * * @return bool * @access public */ function stream_eof() { if (!isset($GLOBALS['_MDB2_databases'][$this->db_index])) { return true; } $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; $result = $db->datatype->_endOfLOB($db->datatype->lobs[$this->lob_index]); if (version_compare(phpversion(), "5.0", ">=") && version_compare(phpversion(), "5.1", "<") ) { return !$result; } return $result; } // }}} // {{{ stream_seek() /** * Seek stream, not implemented * * @param int offset * @param int whence * * @return bool * @access public */ function stream_seek($offset, $whence) { return false; } // }}} // {{{ stream_stat() /** * return information about stream * * @access public */ function stream_stat() { if (isset($GLOBALS['_MDB2_databases'][$this->db_index])) { $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; return array( 'db_index' => $this->db_index, 'lob_index' => $this->lob_index, ); } } // }}} // {{{ stream_close() /** * close stream * * @access public */ function stream_close() { if (isset($GLOBALS['_MDB2_databases'][$this->db_index])) { $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; if (isset($db->datatype->lobs[$this->lob_index])) { $db->datatype->_destroyLOB($db->datatype->lobs[$this->lob_index]); unset($db->datatype->lobs[$this->lob_index]); } } } // }}} } // register streams wrapper if (!stream_wrapper_register("MDB2LOB", "MDB2_LOB")) { MDB2::raiseError(); return false; } ?> catalog/libs/PEAR/MDB2.php0000644577340101002240000041777210625430072017053 0ustar tonerlogicspg11675700000000000000 | // +----------------------------------------------------------------------+ // // $Id: MDB2.php,v 1.275 2006/11/02 07:52:37 lsmith Exp $ // /** * @package MDB2 * @category Database * @author Lukas Smith */ require_once 'PEAR.php'; // {{{ Error constants /** * The method mapErrorCode in each MDB2_dbtype implementation maps * native error codes to one of these. * * If you add an error code here, make sure you also add a textual * version of it in MDB2::errorMessage(). */ define('MDB2_OK', true); define('MDB2_ERROR', -1); define('MDB2_ERROR_SYNTAX', -2); define('MDB2_ERROR_CONSTRAINT', -3); define('MDB2_ERROR_NOT_FOUND', -4); define('MDB2_ERROR_ALREADY_EXISTS', -5); define('MDB2_ERROR_UNSUPPORTED', -6); define('MDB2_ERROR_MISMATCH', -7); define('MDB2_ERROR_INVALID', -8); define('MDB2_ERROR_NOT_CAPABLE', -9); define('MDB2_ERROR_TRUNCATED', -10); define('MDB2_ERROR_INVALID_NUMBER', -11); define('MDB2_ERROR_INVALID_DATE', -12); define('MDB2_ERROR_DIVZERO', -13); define('MDB2_ERROR_NODBSELECTED', -14); define('MDB2_ERROR_CANNOT_CREATE', -15); define('MDB2_ERROR_CANNOT_DELETE', -16); define('MDB2_ERROR_CANNOT_DROP', -17); define('MDB2_ERROR_NOSUCHTABLE', -18); define('MDB2_ERROR_NOSUCHFIELD', -19); define('MDB2_ERROR_NEED_MORE_DATA', -20); define('MDB2_ERROR_NOT_LOCKED', -21); define('MDB2_ERROR_VALUE_COUNT_ON_ROW', -22); define('MDB2_ERROR_INVALID_DSN', -23); define('MDB2_ERROR_CONNECT_FAILED', -24); define('MDB2_ERROR_EXTENSION_NOT_FOUND',-25); define('MDB2_ERROR_NOSUCHDB', -26); define('MDB2_ERROR_ACCESS_VIOLATION', -27); define('MDB2_ERROR_CANNOT_REPLACE', -28); define('MDB2_ERROR_CONSTRAINT_NOT_NULL',-29); define('MDB2_ERROR_DEADLOCK', -30); define('MDB2_ERROR_CANNOT_ALTER', -31); define('MDB2_ERROR_MANAGER', -32); define('MDB2_ERROR_MANAGER_PARSE', -33); define('MDB2_ERROR_LOADMODULE', -34); define('MDB2_ERROR_INSUFFICIENT_DATA', -35); // }}} // {{{ Verbose constants /** * These are just helper constants to more verbosely express parameters to prepare() */ define('MDB2_PREPARE_MANIP', false); define('MDB2_PREPARE_RESULT', null); // }}} // {{{ Fetchmode constants /** * This is a special constant that tells MDB2 the user hasn't specified * any particular get mode, so the default should be used. */ define('MDB2_FETCHMODE_DEFAULT', 0); /** * Column data indexed by numbers, ordered from 0 and up */ define('MDB2_FETCHMODE_ORDERED', 1); /** * Column data indexed by column names */ define('MDB2_FETCHMODE_ASSOC', 2); /** * Column data as object properties */ define('MDB2_FETCHMODE_OBJECT', 3); /** * For multi-dimensional results: normally the first level of arrays * is the row number, and the second level indexed by column number or name. * MDB2_FETCHMODE_FLIPPED switches this order, so the first level of arrays * is the column name, and the second level the row number. */ define('MDB2_FETCHMODE_FLIPPED', 4); // }}} // {{{ Portability mode constants /** * Portability: turn off all portability features. * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_NONE', 0); /** * Portability: convert names of tables and fields to case defined in the * "field_case" option when using the query*(), fetch*() and tableInfo() methods. * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_FIX_CASE', 1); /** * Portability: right trim the data output by query*() and fetch*(). * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_RTRIM', 2); /** * Portability: force reporting the number of rows deleted. * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_DELETE_COUNT', 4); /** * Portability: not needed in MDB2 (just left here for compatibility to DB) * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_NUMROWS', 8); /** * Portability: makes certain error messages in certain drivers compatible * with those from other DBMS's. * * + mysql, mysqli: change unique/primary key constraints * MDB2_ERROR_ALREADY_EXISTS -> MDB2_ERROR_CONSTRAINT * * + odbc(access): MS's ODBC driver reports 'no such field' as code * 07001, which means 'too few parameters.' When this option is on * that code gets mapped to MDB2_ERROR_NOSUCHFIELD. * * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_ERRORS', 16); /** * Portability: convert empty values to null strings in data output by * query*() and fetch*(). * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_EMPTY_TO_NULL', 32); /** * Portability: removes database/table qualifiers from associative indexes * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES', 64); /** * Portability: turn on all portability features. * @see MDB2_Driver_Common::setOption() */ define('MDB2_PORTABILITY_ALL', 127); // }}} // {{{ Globals for class instance tracking /** * These are global variables that are used to track the various class instances */ $GLOBALS['_MDB2_databases'] = array(); $GLOBALS['_MDB2_dsninfo_default'] = array( 'phptype' => false, 'dbsyntax' => false, 'username' => false, 'password' => false, 'protocol' => false, 'hostspec' => false, 'port' => false, 'socket' => false, 'database' => false, 'mode' => false, ); // }}} // {{{ class MDB2 /** * The main 'MDB2' class is simply a container class with some static * methods for creating DB objects as well as some utility functions * common to all parts of DB. * * The object model of MDB2 is as follows (indentation means inheritance): * * MDB2 The main MDB2 class. This is simply a utility class * with some 'static' methods for creating MDB2 objects as * well as common utility functions for other MDB2 classes. * * MDB2_Driver_Common The base for each MDB2 implementation. Provides default * | implementations (in OO lingo virtual methods) for * | the actual DB implementations as well as a bunch of * | query utility functions. * | * +-MDB2_Driver_mysql The MDB2 implementation for MySQL. Inherits MDB2_Driver_Common. * When calling MDB2::factory or MDB2::connect for MySQL * connections, the object returned is an instance of this * class. * +-MDB2_Driver_pgsql The MDB2 implementation for PostGreSQL. Inherits MDB2_Driver_Common. * When calling MDB2::factory or MDB2::connect for PostGreSQL * connections, the object returned is an instance of this * class. * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2 { // {{{ function setOptions(&$db, $options) /** * set option array in an exiting database object * * @param MDB2_Driver_Common MDB2 object * @param array An associative array of option names and their values. * * @return mixed MDB2_OK or a PEAR Error object * * @access public */ function setOptions(&$db, $options) { if (is_array($options)) { foreach ($options as $option => $value) { $test = $db->setOption($option, $value); if (PEAR::isError($test)) { return $test; } } } return MDB2_OK; } // }}} // {{{ function classExists($classname) /** * Checks if a class exists without triggering __autoload * * @param string classname * * @return bool true success and false on error * * @access public */ function classExists($classname) { if (version_compare(phpversion(), "5.0", ">=")) { return class_exists($classname, false); } return class_exists($classname); } // }}} // {{{ function loadClass($class_name, $debug) /** * Loads a PEAR class. * * @param string classname to load * @param bool if errors should be suppressed * * @return bool true success or false on failure * * @access public */ function loadClass($class_name, $debug) { if (!MDB2::classExists($class_name)) { $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php'; if ($debug) { $include = include_once($file_name); } else { $include = @include_once($file_name); } if (!$include) { if (!MDB2::fileExists($file_name)) { $msg = "unable to find package '$class_name' file '$file_name'"; } else { $msg = "unable to load class '$class_name' from file '$file_name'"; } $err =& MDB2::raiseError(MDB2_ERROR_NOT_FOUND, null, null, $msg); return $err; } } return MDB2_OK; } // }}} // {{{ function &factory($dsn, $options = false) /** * Create a new MDB2 object for the specified database type * * IMPORTANT: In order for MDB2 to work properly it is necessary that * you make sure that you work with a reference of the original * object instead of a copy (this is a PHP4 quirk). * * For example: * $db =& MDB2::factory($dsn); * ^^ * And not: * $db = MDB2::factory($dsn); * * @param mixed 'data source name', see the MDB2::parseDSN * method for a description of the dsn format. * Can also be specified as an array of the * format returned by MDB2::parseDSN. * @param array An associative array of option names and * their values. * * @return mixed a newly created MDB2 object, or false on error * * @access public */ function &factory($dsn, $options = false) { $dsninfo = MDB2::parseDSN($dsn); if (empty($dsninfo['phptype'])) { $err =& MDB2::raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'no RDBMS driver specified'); return $err; } $class_name = 'MDB2_Driver_'.$dsninfo['phptype']; $debug = (!empty($options['debug'])); $err = MDB2::loadClass($class_name, $debug); if (PEAR::isError($err)) { return $err; } $db =& new $class_name(); $db->setDSN($dsninfo); $err = MDB2::setOptions($db, $options); if (PEAR::isError($err)) { return $err; } return $db; } // }}} // {{{ function &connect($dsn, $options = false) /** * Create a new MDB2 connection object and connect to the specified * database * * IMPORTANT: In order for MDB2 to work properly it is necessary that * you make sure that you work with a reference of the original * object instead of a copy (this is a PHP4 quirk). * * For example: * $db =& MDB2::connect($dsn); * ^^ * And not: * $db = MDB2::connect($dsn); * ^^ * * @param mixed 'data source name', see the MDB2::parseDSN * method for a description of the dsn format. * Can also be specified as an array of the * format returned by MDB2::parseDSN. * @param array An associative array of option names and * their values. * * @return mixed a newly created MDB2 connection object, or a MDB2 * error object on error * * @access public * @see MDB2::parseDSN */ function &connect($dsn, $options = false) { $db =& MDB2::factory($dsn, $options); if (PEAR::isError($db)) { return $db; } $err = $db->connect(); if (PEAR::isError($err)) { $dsn = $db->getDSN('string', 'xxx'); $db->disconnect(); $err->addUserInfo($dsn); return $err; } return $db; } // }}} // {{{ function &singleton($dsn = null, $options = false) /** * Returns a MDB2 connection with the requested DSN. * A new MDB2 connection object is only created if no object with the * requested DSN exists yet. * * IMPORTANT: In order for MDB2 to work properly it is necessary that * you make sure that you work with a reference of the original * object instead of a copy (this is a PHP4 quirk). * * For example: * $db =& MDB2::singleton($dsn); * ^^ * And not: * $db = MDB2::singleton($dsn); * ^^ * * @param mixed 'data source name', see the MDB2::parseDSN * method for a description of the dsn format. * Can also be specified as an array of the * format returned by MDB2::parseDSN. * @param array An associative array of option names and * their values. * * @return mixed a newly created MDB2 connection object, or a MDB2 * error object on error * * @access public * @see MDB2::parseDSN */ function &singleton($dsn = null, $options = false) { if ($dsn) { $dsninfo = MDB2::parseDSN($dsn); $dsninfo = array_merge($GLOBALS['_MDB2_dsninfo_default'], $dsninfo); $keys = array_keys($GLOBALS['_MDB2_databases']); for ($i=0, $j=count($keys); $i<$j; ++$i) { $tmp_dsn = $GLOBALS['_MDB2_databases'][$keys[$i]]->getDSN('array'); if (count(array_diff($tmp_dsn, $dsninfo)) == 0) { MDB2::setOptions($GLOBALS['_MDB2_databases'][$keys[$i]], $options); return $GLOBALS['_MDB2_databases'][$keys[$i]]; } } } elseif (is_array($GLOBALS['_MDB2_databases']) && reset($GLOBALS['_MDB2_databases'])) { $db =& $GLOBALS['_MDB2_databases'][key($GLOBALS['_MDB2_databases'])]; return $db; } $db =& MDB2::factory($dsn, $options); return $db; } // }}} // {{{ function loadFile($file) /** * load a file (like 'Date') * * @param string name of the file in the MDB2 directory (without '.php') * * @return string name of the file that was included * * @access public */ function loadFile($file) { $file_name = 'MDB2'.DIRECTORY_SEPARATOR.$file.'.php'; if (!MDB2::fileExists($file_name)) { return MDB2::raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'unable to find: '.$file_name); } if (!include_once($file_name)) { return MDB2::raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'unable to load driver class: '.$file_name); } return $file_name; } // }}} // {{{ function apiVersion() /** * Return the MDB2 API version * * @return string the MDB2 API version number * * @access public */ function apiVersion() { return '2.3.0'; } // }}} // {{{ function &raiseError($code = null, $mode = null, $options = null, $userinfo = null) /** * This method is used to communicate an error and invoke error * callbacks etc. Basically a wrapper for PEAR::raiseError * without the message string. * * @param mixed int error code * * @param int error mode, see PEAR_Error docs * * @param mixed If error mode is PEAR_ERROR_TRIGGER, this is the * error level (E_USER_NOTICE etc). If error mode is * PEAR_ERROR_CALLBACK, this is the callback function, * either as a function name, or as an array of an * object and method name. For other error modes this * parameter is ignored. * * @param string Extra debug information. Defaults to the last * query and native error code. * * @param object a PEAR error object * * @return PEAR_Error instance of a PEAR Error object * * @access private * @see PEAR_Error */ function &raiseError($code = null, $mode = null, $options = null, $userinfo = null) { $err =& PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true); return $err; } // }}} // {{{ function isError($data, $code = null) /** * Tell whether a value is a MDB2 error. * * @param mixed the value to test * @param int if is an error object, return true * only if $code is a string and * $db->getMessage() == $code or * $code is an integer and $db->getCode() == $code * * @return bool true if parameter is an error * * @access public */ function isError($data, $code = null) { if (is_a($data, 'MDB2_Error')) { if (is_null($code)) { return true; } elseif (is_string($code)) { return $data->getMessage() === $code; } else { $code = (array)$code; return in_array($data->getCode(), $code); } } return false; } // }}} // {{{ function isConnection($value) /** * Tell whether a value is a MDB2 connection * * @param mixed value to test * * @return bool whether $value is a MDB2 connection * * @access public */ function isConnection($value) { return is_a($value, 'MDB2_Driver_Common'); } // }}} // {{{ function isResult($value) /** * Tell whether a value is a MDB2 result * * @param mixed value to test * * @return bool whether $value is a MDB2 result * * @access public */ function isResult($value) { return is_a($value, 'MDB2_Result'); } // }}} // {{{ function isResultCommon($value) /** * Tell whether a value is a MDB2 result implementing the common interface * * @param mixed value to test * * @return bool whether $value is a MDB2 result implementing the common interface * * @access public */ function isResultCommon($value) { return is_a($value, 'MDB2_Result_Common'); } // }}} // {{{ function isStatement($value) /** * Tell whether a value is a MDB2 statement interface * * @param mixed value to test * * @return bool whether $value is a MDB2 statement interface * * @access public */ function isStatement($value) { return is_a($value, 'MDB2_Statement'); } // }}} // {{{ function errorMessage($value = null) /** * Return a textual error message for a MDB2 error code * * @param int|array integer error code, null to get the current error code-message map, or an array with a new error code-message map * * @return string error message, or false if the error code was * not recognized * * @access public */ function errorMessage($value = null) { static $errorMessages; if (is_array($value)) { $errorMessages = $value; return MDB2_OK; } if (!isset($errorMessages)) { $errorMessages = array( MDB2_OK => 'no error', MDB2_ERROR => 'unknown error', MDB2_ERROR_ALREADY_EXISTS => 'already exists', MDB2_ERROR_CANNOT_CREATE => 'can not create', MDB2_ERROR_CANNOT_ALTER => 'can not alter', MDB2_ERROR_CANNOT_REPLACE => 'can not replace', MDB2_ERROR_CANNOT_DELETE => 'can not delete', MDB2_ERROR_CANNOT_DROP => 'can not drop', MDB2_ERROR_CONSTRAINT => 'constraint violation', MDB2_ERROR_CONSTRAINT_NOT_NULL=> 'null value violates not-null constraint', MDB2_ERROR_DIVZERO => 'division by zero', MDB2_ERROR_INVALID => 'invalid', MDB2_ERROR_INVALID_DATE => 'invalid date or time', MDB2_ERROR_INVALID_NUMBER => 'invalid number', MDB2_ERROR_MISMATCH => 'mismatch', MDB2_ERROR_NODBSELECTED => 'no database selected', MDB2_ERROR_NOSUCHFIELD => 'no such field', MDB2_ERROR_NOSUCHTABLE => 'no such table', MDB2_ERROR_NOT_CAPABLE => 'MDB2 backend not capable', MDB2_ERROR_NOT_FOUND => 'not found', MDB2_ERROR_NOT_LOCKED => 'not locked', MDB2_ERROR_SYNTAX => 'syntax error', MDB2_ERROR_UNSUPPORTED => 'not supported', MDB2_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', MDB2_ERROR_INVALID_DSN => 'invalid DSN', MDB2_ERROR_CONNECT_FAILED => 'connect failed', MDB2_ERROR_NEED_MORE_DATA => 'insufficient data supplied', MDB2_ERROR_EXTENSION_NOT_FOUND=> 'extension not found', MDB2_ERROR_NOSUCHDB => 'no such database', MDB2_ERROR_ACCESS_VIOLATION => 'insufficient permissions', MDB2_ERROR_LOADMODULE => 'error while including on demand module', MDB2_ERROR_TRUNCATED => 'truncated', MDB2_ERROR_DEADLOCK => 'deadlock detected', ); } if (is_null($value)) { return $errorMessages; } if (PEAR::isError($value)) { $value = $value->getCode(); } return isset($errorMessages[$value]) ? $errorMessages[$value] : $errorMessages[MDB2_ERROR]; } // }}} // {{{ function parseDSN($dsn) /** * Parse a data source name. * * Additional keys can be added by appending a URI query string to the * end of the DSN. * * The format of the supplied DSN is in its fullest form: * * phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true * * * Most variations are allowed: * * phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644 * phptype://username:password@hostspec/database_name * phptype://username:password@hostspec * phptype://username@hostspec * phptype://hostspec/database * phptype://hostspec * phptype(dbsyntax) * phptype * * * @param string Data Source Name to be parsed * * @return array an associative array with the following keys: * + phptype: Database backend used in PHP (mysql, odbc etc.) * + dbsyntax: Database used with regards to SQL syntax etc. * + protocol: Communication protocol to use (tcp, unix etc.) * + hostspec: Host specification (hostname[:port]) * + database: Database to use on the DBMS server * + username: User name for login * + password: Password for login * * @access public * @author Tomas V.V.Cox */ function parseDSN($dsn) { $parsed = $GLOBALS['_MDB2_dsninfo_default']; if (is_array($dsn)) { $dsn = array_merge($parsed, $dsn); if (!$dsn['dbsyntax']) { $dsn['dbsyntax'] = $dsn['phptype']; } return $dsn; } // Find phptype and dbsyntax if (($pos = strpos($dsn, '://')) !== false) { $str = substr($dsn, 0, $pos); $dsn = substr($dsn, $pos + 3); } else { $str = $dsn; $dsn = null; } // Get phptype and dbsyntax // $str => phptype(dbsyntax) if (preg_match('|^(.+?)\((.*?)\)$|', $str, $arr)) { $parsed['phptype'] = $arr[1]; $parsed['dbsyntax'] = !$arr[2] ? $arr[1] : $arr[2]; } else { $parsed['phptype'] = $str; $parsed['dbsyntax'] = $str; } if (!count($dsn)) { return $parsed; } // Get (if found): username and password // $dsn => username:password@protocol+hostspec/database if (($at = strrpos($dsn,'@')) !== false) { $str = substr($dsn, 0, $at); $dsn = substr($dsn, $at + 1); if (($pos = strpos($str, ':')) !== false) { $parsed['username'] = rawurldecode(substr($str, 0, $pos)); $parsed['password'] = rawurldecode(substr($str, $pos + 1)); } else { $parsed['username'] = rawurldecode($str); } } // Find protocol and hostspec // $dsn => proto(proto_opts)/database if (preg_match('|^([^(]+)\((.*?)\)/?(.*?)$|', $dsn, $match)) { $proto = $match[1]; $proto_opts = $match[2] ? $match[2] : false; $dsn = $match[3]; // $dsn => protocol+hostspec/database (old format) } else { if (strpos($dsn, '+') !== false) { list($proto, $dsn) = explode('+', $dsn, 2); } if (strpos($dsn, '/') !== false) { list($proto_opts, $dsn) = explode('/', $dsn, 2); } else { $proto_opts = $dsn; $dsn = null; } } // process the different protocol options $parsed['protocol'] = (!empty($proto)) ? $proto : 'tcp'; $proto_opts = rawurldecode($proto_opts); if (strpos($proto_opts, ':') !== false) { list($proto_opts, $parsed['port']) = explode(':', $proto_opts); } if ($parsed['protocol'] == 'tcp') { $parsed['hostspec'] = $proto_opts; } elseif ($parsed['protocol'] == 'unix') { $parsed['socket'] = $proto_opts; } // Get dabase if any // $dsn => database if ($dsn) { // /database if (($pos = strpos($dsn, '?')) === false) { $parsed['database'] = $dsn; // /database?param1=value1¶m2=value2 } else { $parsed['database'] = substr($dsn, 0, $pos); $dsn = substr($dsn, $pos + 1); if (strpos($dsn, '&') !== false) { $opts = explode('&', $dsn); } else { // database?param1=value1 $opts = array($dsn); } foreach ($opts as $opt) { list($key, $value) = explode('=', $opt); if (!isset($parsed[$key])) { // don't allow params overwrite $parsed[$key] = rawurldecode($value); } } } } return $parsed; } // }}} // {{{ function fileExists($file) /** * Checks if a file exists in the include path * * @param string filename * * @return bool true success and false on error * * @access public */ function fileExists($file) { // safe_mode does notwork with is_readable() if (!@ini_get('safe_mode')) { $dirs = explode(PATH_SEPARATOR, ini_get('include_path')); foreach ($dirs as $dir) { if (is_readable($dir . DIRECTORY_SEPARATOR . $file)) { return true; } } } else { $fp = @fopen($file, 'r', true); if (is_resource($fp)) { @fclose($fp); return true; } } return false; } // }}} } // }}} // {{{ class MDB2_Error extends PEAR_Error /** * MDB2_Error implements a class for reporting portable database error * messages. * * @package MDB2 * @category Database * @author Stig Bakken */ class MDB2_Error extends PEAR_Error { // {{{ constructor: function MDB2_Error($code = MDB2_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) /** * MDB2_Error constructor. * * @param mixed MDB2 error code, or string with error message. * @param int what 'error mode' to operate in * @param int what error level to use for $mode & PEAR_ERROR_TRIGGER * @param smixed additional debug info, such as the last query */ function MDB2_Error($code = MDB2_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) { $this->PEAR_Error('MDB2 Error: '.MDB2::errorMessage($code), $code, $mode, $level, $debuginfo); } // }}} } // }}} // {{{ class MDB2_Driver_Common extends PEAR /** * MDB2_Driver_Common: Base class that is extended by each MDB2 driver * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Driver_Common extends PEAR { // {{{ Variables (Properties) /** * index of the MDB2 object within the $GLOBALS['_MDB2_databases'] array * @var int * @access public */ var $db_index = 0; /** * DSN used for the next query * @var array * @access protected */ var $dsn = array(); /** * DSN that was used to create the current connection * @var array * @access protected */ var $connected_dsn = array(); /** * connection resource * @var mixed * @access protected */ var $connection = 0; /** * if the current opened connection is a persistent connection * @var bool * @access protected */ var $opened_persistent; /** * the name of the database for the next query * @var string * @access protected */ var $database_name = ''; /** * the name of the database currently selected * @var string * @access protected */ var $connected_database_name = ''; /** * server version information * @var string * @access protected */ var $connected_server_info = ''; /** * list of all supported features of the given driver * @var array * @access public */ var $supported = array( 'sequences' => false, 'indexes' => false, 'affected_rows' => false, 'summary_functions' => false, 'order_by_text' => false, 'transactions' => false, 'savepoints' => false, 'current_id' => false, 'limit_queries' => false, 'LOBs' => false, 'replace' => false, 'sub_selects' => false, 'auto_increment' => false, 'primary_key' => false, 'result_introspection' => false, 'prepared_statements' => false, 'identifier_quoting' => false, 'pattern_escaping' => false, 'new_link' => false, ); /** * Array of supported options that can be passed to the MDB2 instance. * * The options can be set during object creation, using * MDB2::connect(), MDB2::factory() or MDB2::singleton(). The options can * also be set after the object is created, using MDB2::setOptions() or * MDB2_Driver_Common::setOption(). * The list of available option includes: *
      *
    • $options['ssl'] -> boolean: determines if ssl should be used for connections
    • *
    • $options['field_case'] -> CASE_LOWER|CASE_UPPER: determines what case to force on field/table names
    • *
    • $options['disable_query'] -> boolean: determines if queries should be executed
    • *
    • $options['result_class'] -> string: class used for result sets
    • *
    • $options['buffered_result_class'] -> string: class used for buffered result sets
    • *
    • $options['result_wrap_class'] -> string: class used to wrap result sets into
    • *
    • $options['result_buffering'] -> boolean should results be buffered or not?
    • *
    • $options['fetch_class'] -> string: class to use when fetch mode object is used
    • *
    • $options['persistent'] -> boolean: persistent connection?
    • *
    • $options['debug'] -> integer: numeric debug level
    • *
    • $options['debug_handler'] -> string: function/method that captures debug messages
    • *
    • $options['debug_expanded_output'] -> bool: BC option to determine if more context information should be send to the debug handler
    • *
    • $options['default_text_field_length'] -> integer: default text field length to use
    • *
    • $options['lob_buffer_length'] -> integer: LOB buffer length
    • *
    • $options['log_line_break'] -> string: line-break format
    • *
    • $options['idxname_format'] -> string: pattern for index name
    • *
    • $options['seqname_format'] -> string: pattern for sequence name
    • *
    • $options['savepoint_format'] -> string: pattern for auto generated savepoint names
    • *
    • $options['statement_format'] -> string: pattern for prepared statement names
    • *
    • $options['seqcol_name'] -> string: sequence column name
    • *
    • $options['quote_identifier'] -> boolean: if identifier quoting should be done when check_option is used
    • *
    • $options['use_transactions'] -> boolean: if transaction use should be enabled
    • *
    • $options['decimal_places'] -> integer: number of decimal places to handle
    • *
    • $options['portability'] -> integer: portability constant
    • *
    • $options['modules'] -> array: short to long module name mapping for __call()
    • *
    • $options['emulate_prepared'] -> boolean: force prepared statements to be emulated
    • *
    • $options['datatype_map'] -> array: map user defined datatypes to other primitive datatypes
    • *
    • $options['datatype_map_callback'] -> array: callback function/method that should be called
    • *
    * * @var array * @access public * @see MDB2::connect() * @see MDB2::factory() * @see MDB2::singleton() * @see MDB2_Driver_Common::setOption() */ var $options = array( 'ssl' => false, 'field_case' => CASE_LOWER, 'disable_query' => false, 'result_class' => 'MDB2_Result_%s', 'buffered_result_class' => 'MDB2_BufferedResult_%s', 'result_wrap_class' => false, 'result_buffering' => true, 'fetch_class' => 'stdClass', 'persistent' => false, 'debug' => 0, 'debug_handler' => 'MDB2_defaultDebugOutput', 'debug_expanded_output' => false, 'default_text_field_length' => 4096, 'lob_buffer_length' => 8192, 'log_line_break' => "\n", 'idxname_format' => '%s_idx', 'seqname_format' => '%s_seq', 'savepoint_format' => 'MDB2_SAVEPOINT_%s', 'statement_format' => 'MDB2_STATEMENT_%1$s_%2$s', 'seqcol_name' => 'sequence', 'quote_identifier' => false, 'use_transactions' => true, 'decimal_places' => 2, 'portability' => MDB2_PORTABILITY_ALL, 'modules' => array( 'ex' => 'Extended', 'dt' => 'Datatype', 'mg' => 'Manager', 'rv' => 'Reverse', 'na' => 'Native', 'fc' => 'Function', ), 'emulate_prepared' => false, 'datatype_map' => array(), 'datatype_map_callback' => array(), ); /** * string array * @var string * @access protected */ var $string_quoting = array('start' => "'", 'end' => "'", 'escape' => false, 'escape_pattern' => false); /** * identifier quoting * @var array * @access protected */ var $identifier_quoting = array('start' => '"', 'end' => '"', 'escape' => '"'); /** * sql comments * @var array * @access protected */ var $sql_comments = array( array('start' => '--', 'end' => "\n", 'escape' => false), array('start' => '/*', 'end' => '*/', 'escape' => false), ); /** * comparision wildcards * @var array * @access protected */ var $wildcards = array('%', '_'); /** * column alias keyword * @var string * @access protected */ var $as_keyword = ' AS '; /** * warnings * @var array * @access protected */ var $warnings = array(); /** * string with the debugging information * @var string * @access public */ var $debug_output = ''; /** * determine if there is an open transaction * @var bool * @access protected */ var $in_transaction = false; /** * the smart transaction nesting depth * @var int * @access protected */ var $nested_transaction_counter = null; /** * the first error that occured inside a nested transaction * @var MDB2_Error|bool * @access protected */ var $has_transaction_error = false; /** * result offset used in the next query * @var int * @access protected */ var $offset = 0; /** * result limit used in the next query * @var int * @access protected */ var $limit = 0; /** * Database backend used in PHP (mysql, odbc etc.) * @var string * @access protected */ var $phptype; /** * Database used with regards to SQL syntax etc. * @var string * @access protected */ var $dbsyntax; /** * the last query sent to the driver * @var string * @access public */ var $last_query; /** * the default fetchmode used * @var int * @access protected */ var $fetchmode = MDB2_FETCHMODE_ORDERED; /** * array of module instances * @var array * @access protected */ var $modules = array(); /** * determines of the PHP4 destructor emulation has been enabled yet * @var array * @access protected */ var $destructor_registered = true; // }}} // {{{ constructor: function __construct() /** * Constructor */ function __construct() { end($GLOBALS['_MDB2_databases']); $db_index = key($GLOBALS['_MDB2_databases']) + 1; $GLOBALS['_MDB2_databases'][$db_index] = &$this; $this->db_index = $db_index; } // }}} // {{{ function MDB2_Driver_Common() /** * PHP 4 Constructor */ function MDB2_Driver_Common() { $this->destructor_registered = false; $this->__construct(); } // }}} // {{{ destructor: function __destruct() /** * Destructor */ function __destruct() { $this->disconnect(false); } // }}} // {{{ function free() /** * Free the internal references so that the instance can be destroyed * * @return bool true on success, false if result is invalid * * @access public */ function free() { unset($GLOBALS['_MDB2_databases'][$this->db_index]); unset($this->db_index); return MDB2_OK; } // }}} // {{{ function __toString() /** * String conversation * * @return string representation of the object * * @access public */ function __toString() { $info = get_class($this); $info.= ': (phptype = '.$this->phptype.', dbsyntax = '.$this->dbsyntax.')'; if ($this->connection) { $info.= ' [connected]'; } return $info; } // }}} // {{{ function errorInfo($error = null) /** * This method is used to collect information about an error * * @param mixed error code or resource * * @return array with MDB2 errorcode, native error code, native message * * @access public */ function errorInfo($error = null) { return array($error, null, null); } // }}} // {{{ function &raiseError($code = null, $mode = null, $options = null, $userinfo = null) /** * This method is used to communicate an error and invoke error * callbacks etc. Basically a wrapper for PEAR::raiseError * without the message string. * * @param mixed integer error code, or a PEAR error object (all other * parameters are ignored if this parameter is an object * @param int error mode, see PEAR_Error docs * @param mixed If error mode is PEAR_ERROR_TRIGGER, this is the * error level (E_USER_NOTICE etc). If error mode is * PEAR_ERROR_CALLBACK, this is the callback function, * either as a function name, or as an array of an * object and method name. For other error modes this * parameter is ignored. * @param string Extra debug information. Defaults to the last * query and native error code. * @param string name of the method that triggered the error * * @return PEAR_Error instance of a PEAR Error object * * @access public * @see PEAR_Error */ function &raiseError($code = null, $mode = null, $options = null, $userinfo = null, $method = null) { $userinfo = "[Error message: $userinfo]\n"; // The error is yet a MDB2 error object if (PEAR::isError($code)) { // because we use the static PEAR::raiseError, our global // handler should be used if it is set if (is_null($mode) && !empty($this->_default_error_mode)) { $mode = $this->_default_error_mode; $options = $this->_default_error_options; } if (is_null($userinfo)) { $userinfo = $code->getUserinfo(); } $code = $code->getCode(); } elseif (isset($this->connection)) { if (!empty($this->last_query)) { $userinfo.= "[Last executed query: {$this->last_query}]\n"; } $native_errno = $native_msg = null; list($code, $native_errno, $native_msg) = $this->errorInfo($code); if (!is_null($native_errno) && $native_errno !== '') { $userinfo.= "[Native code: $native_errno]\n"; } if (!is_null($native_msg) && $native_msg !== '') { $userinfo.= "[Native message: ". strip_tags($native_msg) ."]\n"; } if (!is_null($method)) { $userinfo = $method.': '.$userinfo; } } $err =& PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'MDB2_Error', true); if ($err->getMode() !== PEAR_ERROR_RETURN && isset($this->nested_transaction_counter) && !$this->has_transaction_error) { $this->has_transaction_error =& $err; } return $err; } // }}} // {{{ function resetWarnings() /** * reset the warning array * * @return void * * @access public */ function resetWarnings() { $this->warnings = array(); } // }}} // {{{ function getWarnings() /** * Get all warnings in reverse order. * This means that the last warning is the first element in the array * * @return array with warnings * * @access public * @see resetWarnings() */ function getWarnings() { return array_reverse($this->warnings); } // }}} // {{{ function setFetchMode($fetchmode, $object_class = 'stdClass') /** * Sets which fetch mode should be used by default on queries * on this connection * * @param int MDB2_FETCHMODE_ORDERED, MDB2_FETCHMODE_ASSOC * or MDB2_FETCHMODE_OBJECT * @param string the class name of the object to be returned * by the fetch methods when the * MDB2_FETCHMODE_OBJECT mode is selected. * If no class is specified by default a cast * to object from the assoc array row will be * done. There is also the possibility to use * and extend the 'MDB2_row' class. * * @return mixed MDB2_OK or MDB2 Error Object * * @access public * @see MDB2_FETCHMODE_ORDERED, MDB2_FETCHMODE_ASSOC, MDB2_FETCHMODE_OBJECT */ function setFetchMode($fetchmode, $object_class = 'stdClass') { switch ($fetchmode) { case MDB2_FETCHMODE_OBJECT: $this->options['fetch_class'] = $object_class; case MDB2_FETCHMODE_ORDERED: case MDB2_FETCHMODE_ASSOC: $this->fetchmode = $fetchmode; break; default: return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'invalid fetchmode mode', __FUNCTION__); } return MDB2_OK; } // }}} // {{{ function setOption($option, $value) /** * set the option for the db class * * @param string option name * @param mixed value for the option * * @return mixed MDB2_OK or MDB2 Error Object * * @access public */ function setOption($option, $value) { if (array_key_exists($option, $this->options)) { $this->options[$option] = $value; return MDB2_OK; } return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, "unknown option $option", __FUNCTION__); } // }}} // {{{ function getOption($option) /** * Returns the value of an option * * @param string option name * * @return mixed the option value or error object * * @access public */ function getOption($option) { if (array_key_exists($option, $this->options)) { return $this->options[$option]; } return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, "unknown option $option", __FUNCTION__); } // }}} // {{{ function debug($message, $scope = '', $is_manip = null) /** * set a debug message * * @param string message that should be appended to the debug variable * @param string usually the method name that triggered the debug call: * for example 'query', 'prepare', 'execute', 'parameters', * 'beginTransaction', 'commit', 'rollback' * @param array contains context information about the debug() call * common keys are: is_manip, time, result etc. * * @return void * * @access public */ function debug($message, $scope = '', $context = array()) { if ($this->options['debug'] && $this->options['debug_handler']) { if (!$this->options['debug_expanded_output']) { if (!empty($context['when']) && $context['when'] !== 'pre') { return null; } $context = empty($context['is_manip']) ? false : $context['is_manip']; } return call_user_func_array($this->options['debug_handler'], array(&$this, $scope, $message, $context)); } return null; } // }}} // {{{ function getDebugOutput() /** * output debug info * * @return string content of the debug_output class variable * * @access public */ function getDebugOutput() { return $this->debug_output; } // }}} // {{{ function escape($text) /** * Quotes a string so it can be safely used in a query. It will quote * the text so it can safely be used within a query. * * @param string the input string to quote * @param bool escape wildcards * * @return string quoted string * * @access public */ function escape($text, $escape_wildcards = false) { if ($escape_wildcards) { $text = $this->escapePattern($text); } $text = str_replace($this->string_quoting['end'], $this->string_quoting['escape'] . $this->string_quoting['end'], $text); return $text; } // }}} // {{{ function escapePattern($text) /** * Quotes pattern (% and _) characters in a string) * * EXPERIMENTAL * * WARNING: this function is experimental and may change signature at * any time until labelled as non-experimental * * @param string the input string to quote * * @return string quoted string * * @access public */ function escapePattern($text) { if ($this->string_quoting['escape_pattern']) { $text = str_replace($this->string_quoting['escape_pattern'], $this->string_quoting['escape_pattern'] . $this->string_quoting['escape_pattern'], $text); foreach ($this->wildcards as $wildcard) { $text = str_replace($wildcard, $this->string_quoting['escape_pattern'] . $wildcard, $text); } } return $text; } // }}} // {{{ function quoteIdentifier($str, $check_option = false) /** * Quote a string so it can be safely used as a table or column name * * Delimiting style depends on which database driver is being used. * * NOTE: just because you CAN use delimited identifiers doesn't mean * you SHOULD use them. In general, they end up causing way more * problems than they solve. * * Portability is broken by using the following characters inside * delimited identifiers: * + backtick (`) -- due to MySQL * + double quote (") -- due to Oracle * + brackets ([ or ]) -- due to Access * * Delimited identifiers are known to generally work correctly under * the following drivers: * + mssql * + mysql * + mysqli * + oci8 * + pgsql * + sqlite * * InterBase doesn't seem to be able to use delimited identifiers * via PHP 4. They work fine under PHP 5. * * @param string identifier name to be quoted * @param bool check the 'quote_identifier' option * * @return string quoted identifier string * * @access public */ function quoteIdentifier($str, $check_option = false) { if ($check_option && !$this->options['quote_identifier']) { return $str; } $str = str_replace($this->identifier_quoting['end'], $this->identifier_quoting['escape'] . $this->identifier_quoting['end'], $str); return $this->identifier_quoting['start'] . $str . $this->identifier_quoting['end']; } // }}} // {{{ function getAsKeyword() /** * Gets the string to alias column * * @return string to use when aliasing a column */ function getAsKeyword() { return $this->as_keyword; } // }}} // {{{ function getConnection() /** * Returns a native connection * * @return mixed a valid MDB2 connection object, * or a MDB2 error object on error * * @access public */ function getConnection() { $result = $this->connect(); if (PEAR::isError($result)) { return $result; } return $this->connection; } // }}} // {{{ function _fixResultArrayValues(&$row, $mode) /** * Do all necessary conversions on result arrays to fix DBMS quirks * * @param array the array to be fixed (passed by reference) * @param array bit-wise addition of the required portability modes * * @return void * * @access protected */ function _fixResultArrayValues(&$row, $mode) { switch ($mode) { case MDB2_PORTABILITY_EMPTY_TO_NULL: foreach ($row as $key => $value) { if ($value === '') { $row[$key] = null; } } break; case MDB2_PORTABILITY_RTRIM: foreach ($row as $key => $value) { if (is_string($value)) { $row[$key] = rtrim($value); } } break; case MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES: $tmp_row = array(); foreach ($row as $key => $value) { $tmp_row[preg_replace('/^(?:.*\.)?([^.]+)$/', '\\1', $key)] = $value; } $row = $tmp_row; break; case (MDB2_PORTABILITY_RTRIM + MDB2_PORTABILITY_EMPTY_TO_NULL): foreach ($row as $key => $value) { if ($value === '') { $row[$key] = null; } elseif (is_string($value)) { $row[$key] = rtrim($value); } } break; case (MDB2_PORTABILITY_RTRIM + MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES): $tmp_row = array(); foreach ($row as $key => $value) { if (is_string($value)) { $value = rtrim($value); } $tmp_row[preg_replace('/^(?:.*\.)?([^.]+)$/', '\\1', $key)] = $value; } $row = $tmp_row; break; case (MDB2_PORTABILITY_EMPTY_TO_NULL + MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES): $tmp_row = array(); foreach ($row as $key => $value) { if ($value === '') { $value = null; } $tmp_row[preg_replace('/^(?:.*\.)?([^.]+)$/', '\\1', $key)] = $value; } $row = $tmp_row; break; case (MDB2_PORTABILITY_RTRIM + MDB2_PORTABILITY_EMPTY_TO_NULL + MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES): $tmp_row = array(); foreach ($row as $key => $value) { if ($value === '') { $value = null; } elseif (is_string($value)) { $value = rtrim($value); } $tmp_row[preg_replace('/^(?:.*\.)?([^.]+)$/', '\\1', $key)] = $value; } $row = $tmp_row; break; } } // }}} // {{{ function &loadModule($module, $property = null, $phptype_specific = null) /** * loads a module * * @param string name of the module that should be loaded * (only used for error messages) * @param string name of the property into which the class will be loaded * @param bool if the class to load for the module * is specific to the phptype * * @return object on success a reference to the given module is returned * and on failure a PEAR error * * @access public */ function &loadModule($module, $property = null, $phptype_specific = null) { if (!$property) { $property = strtolower($module); } if (!isset($this->{$property})) { $version = $phptype_specific; if ($phptype_specific !== false) { $version = true; $class_name = 'MDB2_Driver_'.$module.'_'.$this->phptype; $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php'; } if ($phptype_specific === false || (!MDB2::classExists($class_name) && !MDB2::fileExists($file_name)) ) { $version = false; $class_name = 'MDB2_'.$module; $file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php'; } $err = MDB2::loadClass($class_name, $this->getOption('debug')); if (PEAR::isError($err)) { return $err; } // load modul in a specific version if ($version) { if (method_exists($class_name, 'getClassName')) { $class_name_new = call_user_func(array($class_name, 'getClassName'), $this->db_index); if ($class_name != $class_name_new) { $class_name = $class_name_new; $err = MDB2::loadClass($class_name, $this->getOption('debug')); if (PEAR::isError($err)) { return $err; } } } } if (!class_exists($class_name)) { $err =& $this->raiseError(MDB2_ERROR_LOADMODULE, null, null, "unable to load module '$module' into property '$property'", __FUNCTION__); return $err; } $this->{$property} =& new $class_name($this->db_index); $this->modules[$module] =& $this->{$property}; if ($version) { // this will be used in the connect method to determine if the module // needs to be loaded with a different version if the server // version changed in between connects $this->loaded_version_modules[] = $property; } } return $this->{$property}; } // }}} // {{{ function __call($method, $params) /** * Calls a module method using the __call magic method * * @param string Method name. * @param array Arguments. * * @return mixed Returned value. */ function __call($method, $params) { $module = null; if (preg_match('/^([a-z]+)([A-Z])(.*)$/', $method, $match) && isset($this->options['modules'][$match[1]]) ) { $module = $this->options['modules'][$match[1]]; $method = strtolower($match[2]).$match[3]; if (!isset($this->modules[$module]) || !is_object($this->modules[$module])) { $result =& $this->loadModule($module); if (PEAR::isError($result)) { return $result; } } } else { foreach ($this->modules as $key => $foo) { if (is_object($this->modules[$key]) && method_exists($this->modules[$key], $method) ) { $module = $key; break; } } } if (!is_null($module)) { return call_user_func_array(array(&$this->modules[$module], $method), $params); } trigger_error(sprintf('Call to undefined function: %s::%s().', get_class($this), $method), E_USER_ERROR); } // }}} // {{{ function beginTransaction($savepoint = null) /** * Start a transaction or set a savepoint. * * @param string name of a savepoint to set * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function beginTransaction($savepoint = null) { $this->debug('Starting transaction', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint)); return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'transactions are not supported', __FUNCTION__); } // }}} // {{{ function commit($savepoint = null) /** * Commit the database changes done during a transaction that is in * progress or release a savepoint. This function may only be called when * auto-committing is disabled, otherwise it will fail. Therefore, a new * transaction is implicitly started after committing the pending changes. * * @param string name of a savepoint to release * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function commit($savepoint = null) { $this->debug('Committing transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint)); return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'commiting transactions is not supported', __FUNCTION__); } // }}} // {{{ function rollback($savepoint = null) /** * Cancel any database changes done during a transaction or since a specific * savepoint that is in progress. This function may only be called when * auto-committing is disabled, otherwise it will fail. Therefore, a new * transaction is implicitly started after canceling the pending changes. * * @param string name of a savepoint to rollback to * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function rollback($savepoint = null) { $this->debug('Rolling back transaction/savepoint', __FUNCTION__, array('is_manip' => true, 'savepoint' => $savepoint)); return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'rolling back transactions is not supported', __FUNCTION__); } // }}} // {{{ function inTransaction($ignore_nested = false) /** * If a transaction is currently open. * * @param bool if the nested transaction count should be ignored * @return int|bool - an integer with the nesting depth is returned if a * nested transaction is open * - true is returned for a normal open transaction * - false is returned if no transaction is open * * @access public */ function inTransaction($ignore_nested = false) { if (!$ignore_nested && isset($this->nested_transaction_counter)) { return $this->nested_transaction_counter; } return $this->in_transaction; } // }}} // {{{ function setTransactionIsolation($isolation) /** * Set the transacton isolation level. * * @param string standard isolation level * READ UNCOMMITTED (allows dirty reads) * READ COMMITTED (prevents dirty reads) * REPEATABLE READ (prevents nonrepeatable reads) * SERIALIZABLE (prevents phantom reads) * @param array some transaction options: * 'wait' => 'WAIT' | 'NO WAIT' * 'rw' => 'READ WRITE' | 'READ ONLY' * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public * @since 2.1.1 */ function setTransactionIsolation($isolation, $options = array()) { $this->debug('Setting transaction isolation level', __FUNCTION__, array('is_manip' => true)); return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'isolation level setting is not supported', __FUNCTION__); } // }}} // {{{ function beginNestedTransaction($savepoint = false) /** * Start a nested transaction. * * EXPERIMENTAL * * WARNING: this function is experimental and may change signature at * any time until labelled as non-experimental * * @return mixed MDB2_OK on success/savepoint name, a MDB2 error on failure * * @access public * @since 2.1.1 */ function beginNestedTransaction() { if ($this->in_transaction) { ++$this->nested_transaction_counter; $savepoint = sprintf($this->options['savepoint_format'], $this->nested_transaction_counter); if ($this->supports('savepoints') && $savepoint) { return $this->beginTransaction($savepoint); } return MDB2_OK; } $this->has_transaction_error = false; $result = $this->beginTransaction(); $this->nested_transaction_counter = 1; return $result; } // }}} // {{{ function completeNestedTransaction($force_rollback = false, $release = false) /** * Finish a nested transaction by rolling back if an error occured or * committing otherwise. * * EXPERIMENTAL * * WARNING: this function is experimental and may change signature at * any time until labelled as non-experimental * * @param bool if the transaction should be rolled back regardless * even if no error was set within the nested transaction * @return mixed MDB_OK on commit/counter decrementing, false on rollback * and a MDB2 error on failure * * @access public * @since 2.1.1 */ function completeNestedTransaction($force_rollback = false) { if ($this->nested_transaction_counter > 1) { $savepoint = sprintf($this->options['savepoint_format'], $this->nested_transaction_counter); if ($this->supports('savepoints') && $savepoint) { if ($force_rollback || $this->has_transaction_error) { $result = $this->rollback($savepoint); if (!PEAR::isError($result)) { $result = false; $this->has_transaction_error = false; } } else { $result = $this->commit($savepoint); } } else { $result = MDB2_OK; } --$this->nested_transaction_counter; return $result; } $this->nested_transaction_counter = null; $result = MDB2_OK; // transaction has not yet been rolled back if ($this->in_transaction) { if ($force_rollback || $this->has_transaction_error) { $result = $this->rollback(); if (!PEAR::isError($result)) { $result = false; } } else { $result = $this->commit(); } } $this->has_transaction_error = false; return $result; } // }}} // {{{ function failNestedTransaction($error = null, $immediately = false) /** * Force setting nested transaction to failed. * * EXPERIMENTAL * * WARNING: this function is experimental and may change signature at * any time until labelled as non-experimental * * @param mixed value to return in getNestededTransactionError() * @param bool if the transaction should be rolled back immediately * @return bool MDB2_OK * * @access public * @since 2.1.1 */ function failNestedTransaction($error = null, $immediately = false) { if (is_null($error)) { $error = $this->has_transaction_error ? $this->has_transaction_error : true; } elseif (!$error) { $error = true; } $this->has_transaction_error = $error; if (!$immediately) { return MDB2_OK; } return $this->rollback(); } // }}} // {{{ function getNestedTransactionError() /** * The first error that occured since the transaction start. * * EXPERIMENTAL * * WARNING: this function is experimental and may change signature at * any time until labelled as non-experimental * * @return MDB2_Error|bool MDB2 error object if an error occured or false. * * @access public * @since 2.1.1 */ function getNestedTransactionError() { return $this->has_transaction_error; } // }}} // {{{ connect() /** * Connect to the database * * @return true on success, MDB2 Error Object on failure */ function connect() { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ setCharset($charset, $connection = null) /** * Set the charset on the current connection * * @param string charset * @param resource connection handle * * @return true on success, MDB2 Error Object on failure */ function setCharset($charset, $connection = null) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function disconnect($force = true) /** * Log out and disconnect from the database. * * @param bool if the disconnect should be forced even if the * connection is opened persistently * * @return mixed true on success, false if not connected and error * object on error * * @access public */ function disconnect($force = true) { $this->connection = 0; $this->connected_dsn = array(); $this->connected_database_name = ''; $this->opened_persistent = null; $this->connected_server_info = ''; $this->in_transaction = null; $this->nested_transaction_counter = 0; return MDB2_OK; } // }}} // {{{ function setDatabase($name) /** * Select a different database * * @param string name of the database that should be selected * * @return string name of the database previously connected to * * @access public */ function setDatabase($name) { $previous_database_name = (isset($this->database_name)) ? $this->database_name : ''; $this->database_name = $name; $this->disconnect(false); return $previous_database_name; } // }}} // {{{ function getDatabase() /** * Get the current database * * @return string name of the database * * @access public */ function getDatabase() { return $this->database_name; } // }}} // {{{ function setDSN($dsn) /** * set the DSN * * @param mixed DSN string or array * * @return MDB2_OK * * @access public */ function setDSN($dsn) { $dsn_default = $GLOBALS['_MDB2_dsninfo_default']; $dsn = MDB2::parseDSN($dsn); if (array_key_exists('database', $dsn)) { $this->database_name = $dsn['database']; unset($dsn['database']); } $this->dsn = array_merge($dsn_default, $dsn); return $this->disconnect(false); } // }}} // {{{ function getDSN($type = 'string', $hidepw = false) /** * return the DSN as a string * * @param string format to return ("array", "string") * @param string string to hide the password with * * @return mixed DSN in the chosen type * * @access public */ function getDSN($type = 'string', $hidepw = false) { $dsn = array_merge($GLOBALS['_MDB2_dsninfo_default'], $this->dsn); $dsn['phptype'] = $this->phptype; $dsn['database'] = $this->database_name; if ($hidepw) { $dsn['password'] = $hidepw; } switch ($type) { // expand to include all possible options case 'string': $dsn = $dsn['phptype']. ($dsn['dbsyntax'] ? ('('.$dsn['dbsyntax'].')') : ''). '://'.$dsn['username'].':'. $dsn['password'].'@'.$dsn['hostspec']. ($dsn['port'] ? (':'.$dsn['port']) : ''). '/'.$dsn['database']; break; case 'array': default: break; } return $dsn; } // }}} // {{{ function &standaloneQuery($query, $types = null, $is_manip = false) /** * execute a query as database administrator * * @param string the SQL query * @param mixed array that contains the types of the columns in * the result set * @param bool if the query is a manipulation query * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function &standaloneQuery($query, $types = null, $is_manip = false) { $offset = $this->offset; $limit = $this->limit; $this->offset = $this->limit = 0; $query = $this->_modifyQuery($query, $is_manip, $limit, $offset); $connection = $this->getConnection(); if (PEAR::isError($connection)) { return $connection; } $result =& $this->_doQuery($query, $is_manip, $connection, false); if (PEAR::isError($result)) { return $result; } if ($is_manip) { $affected_rows = $this->_affectedRows($connection, $result); return $affected_rows; } $result =& $this->_wrapResult($result, $types, true, false, $limit, $offset); return $result; } // }}} // {{{ function _modifyQuery($query, $is_manip, $limit, $offset) /** * Changes a query string for various DBMS specific reasons * * @param string query to modify * @param bool if it is a DML query * @param int limit the number of rows * @param int start reading from given offset * * @return string modified query * * @access protected */ function _modifyQuery($query, $is_manip, $limit, $offset) { return $query; } // }}} // {{{ function &_doQuery($query, $is_manip = false, $connection = null, $database_name = null) /** * Execute a query * @param string query * @param bool if the query is a manipulation query * @param resource connection handle * @param string database name * * @return result or error object * * @access protected */ function &_doQuery($query, $is_manip = false, $connection = null, $database_name = null) { $this->last_query = $query; $result = $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'pre')); if ($result) { if (PEAR::isError($result)) { return $result; } $query = $result; } $err =& $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); return $err; } // }}} // {{{ function _affectedRows($connection, $result = null) /** * Returns the number of rows affected * * @param resource result handle * @param resource connection handle * * @return mixed MDB2 Error Object or the number of rows affected * * @access private */ function _affectedRows($connection, $result = null) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function exec($query) /** * Execute a manipulation query to the database and return any the affected rows * * @param string the SQL query * * @return mixed affected rows on success, a MDB2 error on failure * * @access public */ function exec($query) { $offset = $this->offset; $limit = $this->limit; $this->offset = $this->limit = 0; $query = $this->_modifyQuery($query, true, $limit, $offset); $connection = $this->getConnection(); if (PEAR::isError($connection)) { return $connection; } $result =& $this->_doQuery($query, true, $connection, $this->database_name); if (PEAR::isError($result)) { return $result; } return $this->_affectedRows($connection, $result); } // }}} // {{{ function &query($query, $types = null, $result_class = true, $result_wrap_class = false) /** * Send a query to the database and return any results * * @param string the SQL query * @param mixed array that contains the types of the columns in * the result set * @param mixed string which specifies which result class to use * @param mixed string which specifies which class to wrap results in * @param object a result handle on success, a MDB2 error on failure * * @return mixed an MDB2_Result, a MDB2 error on failure * * @access public */ function &query($query, $types = null, $result_class = true, $result_wrap_class = false) { $offset = $this->offset; $limit = $this->limit; $this->offset = $this->limit = 0; $query = $this->_modifyQuery($query, false, $limit, $offset); $connection = $this->getConnection(); if (PEAR::isError($connection)) { return $connection; } $result =& $this->_doQuery($query, false, $connection, $this->database_name); if (PEAR::isError($result)) { return $result; } $result =& $this->_wrapResult($result, $types, $result_class, $result_wrap_class, $limit, $offset); return $result; } // }}} // {{{ function &_wrapResult($result, $types = array(), $result_class = true, $result_wrap_class = false, $limit = null, $offset = null) /** * wrap a result set into the correct class * * @param resource result handle * @param mixed array that contains the types of the columns in * the result set * @param mixed string which specifies which result class to use * @param mixed string which specifies which class to wrap results in * @param string number of rows to select * @param string first row to select * * @return mixed an MDB2_Result, a MDB2 error on failure * * @access protected */ function &_wrapResult($result, $types = array(), $result_class = true, $result_wrap_class = false, $limit = null, $offset = null) { if ($types === true) { if ($this->supports('result_introspection')) { $this->loadModule('Reverse', null, true); $tableInfo = $this->reverse->tableInfo($result); if (PEAR::isError($tableInfo)) { return $tableInfo; } $types = array(); foreach ($tableInfo as $field) { $types[] = $field['mdb2type']; } } else { $types = null; } } if ($result_class === true) { $result_class = $this->options['result_buffering'] ? $this->options['buffered_result_class'] : $this->options['result_class']; } if ($result_class) { $class_name = sprintf($result_class, $this->phptype); if (!class_exists($class_name)) { $err =& $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'result class does not exist '.$class_name, __FUNCTION__); return $err; } $result =& new $class_name($this, $result, $limit, $offset); if (!MDB2::isResultCommon($result)) { $err =& $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'result class is not extended from MDB2_Result_Common', __FUNCTION__); return $err; } if (!empty($types)) { $err = $result->setResultTypes($types); if (PEAR::isError($err)) { $result->free(); return $err; } } } if ($result_wrap_class === true) { $result_wrap_class = $this->options['result_wrap_class']; } if ($result_wrap_class) { if (!class_exists($result_wrap_class)) { $err =& $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'result wrap class does not exist '.$result_wrap_class, __FUNCTION__); return $err; } $result =& new $result_wrap_class($result, $this->fetchmode); } return $result; } // }}} // {{{ function getServerVersion($native = false) /** * return version information about the server * * @param string determines if the raw version string should be returned * * @return mixed array with version information or row string * * @access public */ function getServerVersion($native = false) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function setLimit($limit, $offset = null) /** * set the range of the next query * * @param string number of rows to select * @param string first row to select * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function setLimit($limit, $offset = null) { if (!$this->supports('limit_queries')) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'limit is not supported by this driver', __FUNCTION__); } $limit = (int)$limit; if ($limit < 0) { return $this->raiseError(MDB2_ERROR_SYNTAX, null, null, 'it was not specified a valid selected range row limit', __FUNCTION__); } $this->limit = $limit; if (!is_null($offset)) { $offset = (int)$offset; if ($offset < 0) { return $this->raiseError(MDB2_ERROR_SYNTAX, null, null, 'it was not specified a valid first selected range row', __FUNCTION__); } $this->offset = $offset; } return MDB2_OK; } // }}} // {{{ function subSelect($query, $type = false) /** * simple subselect emulation: leaves the query untouched for all RDBMS * that support subselects * * @param string the SQL query for the subselect that may only * return a column * @param string determines type of the field * * @return string the query * * @access public */ function subSelect($query, $type = false) { if ($this->supports('sub_selects') === true) { return $query; } if (!$this->supports('sub_selects')) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } $col = $this->queryCol($query, $type); if (PEAR::isError($col)) { return $col; } if (!is_array($col) || count($col) == 0) { return 'NULL'; } if ($type) { $this->loadModule('Datatype', null, true); return $this->datatype->implodeArray($col, $type); } return implode(', ', $col); } // }}} // {{{ function replace($table, $fields) /** * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT * query, except that if there is already a row in the table with the same * key field values, the REPLACE query just updates its values instead of * inserting a new row. * * The REPLACE type of query does not make part of the SQL standards. Since * practically only MySQL and SQLite implement it natively, this type of * query isemulated through this method for other DBMS using standard types * of queries inside a transaction to assure the atomicity of the operation. * * @param string name of the table on which the REPLACE query will * be executed. * @param array associative array that describes the fields and the * values that will be inserted or updated in the specified table. The * indexes of the array are the names of all the fields of the table. * The values of the array are also associative arrays that describe * the values and other properties of the table fields. * * Here follows a list of field properties that need to be specified: * * value * Value to be assigned to the specified field. This value may be * of specified in database independent type format as this * function can perform the necessary datatype conversions. * * Default: this property is required unless the Null property is * set to 1. * * type * Name of the type of the field. Currently, all types MDB2 * are supported except for clob and blob. * * Default: no type conversion * * null * bool property that indicates that the value for this field * should be set to null. * * The default value for fields missing in INSERT queries may be * specified the definition of a table. Often, the default value * is already null, but since the REPLACE may be emulated using * an UPDATE query, make sure that all fields of the table are * listed in this function argument array. * * Default: 0 * * key * bool property that indicates that this field should be * handled as a primary key or at least as part of the compound * unique index of the table that will determine the row that will * updated if it exists or inserted a new row otherwise. * * This function will fail if no key field is specified or if the * value of a key field is set to null because fields that are * part of unique index they may not be null. * * Default: 0 * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function replace($table, $fields) { if (!$this->supports('replace')) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'replace query is not supported', __FUNCTION__); } $count = count($fields); $condition = $values = array(); for ($colnum = 0, reset($fields); $colnum < $count; next($fields), $colnum++) { $name = key($fields); if (isset($fields[$name]['null']) && $fields[$name]['null']) { $value = 'NULL'; } else { $type = isset($fields[$name]['type']) ? $fields[$name]['type'] : null; $value = $this->quote($fields[$name]['value'], $type); } $values[$name] = $value; if (isset($fields[$name]['key']) && $fields[$name]['key']) { if ($value === 'NULL') { return $this->raiseError(MDB2_ERROR_CANNOT_REPLACE, null, null, 'key value '.$name.' may not be NULL', __FUNCTION__); } $condition[] = $name . '=' . $value; } } if (empty($condition)) { return $this->raiseError(MDB2_ERROR_CANNOT_REPLACE, null, null, 'not specified which fields are keys', __FUNCTION__); } $result = null; $in_transaction = $this->in_transaction; if (!$in_transaction && PEAR::isError($result = $this->beginTransaction())) { return $result; } $connection = $this->getConnection(); if (PEAR::isError($connection)) { return $connection; } $condition = ' WHERE '.implode(' AND ', $condition); $query = "DELETE FROM $table$condition"; $result =& $this->_doQuery($query, true, $connection); if (!PEAR::isError($result)) { $affected_rows = $this->_affectedRows($connection, $result); $insert = implode(', ', array_keys($values)); $values = implode(', ', $values); $query = "INSERT INTO $table ($insert) VALUES ($values)"; $result =& $this->_doQuery($query, true, $connection); if (!PEAR::isError($result)) { $affected_rows += $this->_affectedRows($connection, $result);; } } if (!$in_transaction) { if (PEAR::isError($result)) { $this->rollback(); } else { $result = $this->commit(); } } if (PEAR::isError($result)) { return $result; } return $affected_rows; } // }}} // {{{ function &prepare($query, $types = null, $result_types = null, $lobs = array()) /** * Prepares a query for multiple execution with execute(). * With some database backends, this is emulated. * prepare() requires a generic query as string like * 'INSERT INTO numbers VALUES(?,?)' or * 'INSERT INTO numbers VALUES(:foo,:bar)'. * The ? and :[a-zA-Z] and are placeholders which can be set using * bindParam() and the query can be send off using the execute() method. * * @param string the query to prepare * @param mixed array that contains the types of the placeholders * @param mixed array that contains the types of the columns in * the result set or MDB2_PREPARE_RESULT, if set to * MDB2_PREPARE_MANIP the query is handled as a manipulation query * @param mixed key (field) value (parameter) pair for all lob placeholders * * @return mixed resource handle for the prepared query on success, a MDB2 * error on failure * * @access public * @see bindParam, execute */ function &prepare($query, $types = null, $result_types = null, $lobs = array()) { $is_manip = ($result_types === MDB2_PREPARE_MANIP); $offset = $this->offset; $limit = $this->limit; $this->offset = $this->limit = 0; $result = $this->debug($query, __FUNCTION__, array('is_manip' => $is_manip, 'when' => 'pre')); if ($result) { if (PEAR::isError($result)) { return $result; } $query = $result; } $placeholder_type_guess = $placeholder_type = null; $question = '?'; $colon = ':'; $positions = array(); $position = 0; $ignores = $this->sql_comments; $ignores[] = $this->string_quoting; $ignores[] = $this->identifier_quoting; while ($position < strlen($query)) { $q_position = strpos($query, $question, $position); $c_position = strpos($query, $colon, $position); if ($q_position && $c_position) { $p_position = min($q_position, $c_position); } elseif ($q_position) { $p_position = $q_position; } elseif ($c_position) { $p_position = $c_position; } else { break; } if (is_null($placeholder_type)) { $placeholder_type_guess = $query[$p_position]; } $new_pos = $this->_skipDelimitedStrings($query, $position, $p_position); if (PEAR::isError($new_pos)) { return $new_pos; } if ($new_pos != $position) { $position = $new_pos; continue; //evaluate again starting from the new position } if ($query[$position] == $placeholder_type_guess) { if (is_null($placeholder_type)) { $placeholder_type = $query[$p_position]; $question = $colon = $placeholder_type; if (!empty($types) && is_array($types)) { if ($placeholder_type == ':') { if (is_int(key($types))) { $types_tmp = $types; $types = array(); $count = -1; } } else { $types = array_values($types); } } } if ($placeholder_type == ':') { $parameter = preg_replace('/^.{'.($position+1).'}([a-z0-9_]+).*$/si', '\\1', $query); if ($parameter === '') { $err =& $this->raiseError(MDB2_ERROR_SYNTAX, null, null, 'named parameter with an empty name', __FUNCTION__); return $err; } $positions[$p_position] = $parameter; $query = substr_replace($query, '?', $position, strlen($parameter)+1); // use parameter name in type array if (isset($count) && isset($types_tmp[++$count])) { $types[$parameter] = $types_tmp[$count]; } } else { $positions[$p_position] = count($positions); } $position = $p_position + 1; } else { $position = $p_position; } } $class_name = 'MDB2_Statement_'.$this->phptype; $statement = null; $obj =& new $class_name($this, $statement, $positions, $query, $types, $result_types, $is_manip, $limit, $offset); $this->debug($query, __FUNCTION__, array('is_manip' => $is_manip, 'when' => 'post', 'result' => $obj)); return $obj; } // }}} // {{{ function _skipDelimitedStrings($value, $type = null, $quote = true) /** * Utility method, used by prepare() to avoid replacing placeholders within delimited strings. * Check if the placeholder is contained within a delimited string. * If so, skip it and advance the position, otherwise return the current position, * which is valid * * @param $query * @param $position current string cursor position * @param $p_position placeholder position * * @return mixed integer $new_position on success * MDB2_Error on failure * * @access protected */ function _skipDelimitedStrings($query, $position, $p_position) { $ignores = $this->sql_comments; $ignores[] = $this->string_quoting; $ignores[] = $this->identifier_quoting; foreach ($ignores as $ignore) { if (!empty($ignore['start'])) { if (is_int($start_quote = strpos($query, $ignore['start'], $position)) && $start_quote < $p_position) { $end_quote = $start_quote; do { if (!is_int($end_quote = strpos($query, $ignore['end'], $end_quote + 1))) { if ($ignore['end'] === "\n") { $end_quote = strlen($query) - 1; } else { $err =& $this->raiseError(MDB2_ERROR_SYNTAX, null, null, 'query with an unterminated text string specified', __FUNCTION__); return $err; } } } while ($ignore['escape'] && $query[($end_quote - 1)] == $ignore['escape']); $position = $end_quote + 1; return $position; } } } return $position; } // }}} // {{{ function quote($value, $type = null, $quote = true) /** * Convert a text value into a DBMS specific format that is suitable to * compose query statements. * * @param string text string value that is intended to be converted. * @param string type to which the value should be converted to * @param bool escape wildcards * * @return string text string that represents the given argument value in * a DBMS specific format. * * @access public */ function quote($value, $type = null, $quote = true, $escape_wildcards = false) { $result = $this->loadModule('Datatype', null, true); if (PEAR::isError($result)) { return $result; } return $this->datatype->quote($value, $type, $quote, $escape_wildcards); } // }}} // {{{ function getDeclaration($type, $name, $field) /** * Obtain DBMS specific SQL code portion needed to declare * of the given type * * @param string type to which the value should be converted to * @param string name the field to be declared. * @param string definition of the field * * @return string DBMS specific SQL code portion that should be used to * declare the specified field. * * @access public */ function getDeclaration($type, $name, $field) { $result = $this->loadModule('Datatype', null, true); if (PEAR::isError($result)) { return $result; } return $this->datatype->getDeclaration($type, $name, $field); } // }}} // {{{ function compareDefinition($current, $previous) /** * Obtain an array of changes that may need to applied * * @param array new definition * @param array old definition * * @return array containing all changes that will need to be applied * * @access public */ function compareDefinition($current, $previous) { $result = $this->loadModule('Datatype', null, true); if (PEAR::isError($result)) { return $result; } return $this->datatype->compareDefinition($current, $previous); } // }}} // {{{ function supports($feature) /** * Tell whether a DB implementation or its backend extension * supports a given feature. * * @param string name of the feature (see the MDB2 class doc) * * @return bool|string if this DB implementation supports a given feature * false means no, true means native, * 'emulated' means emulated * * @access public */ function supports($feature) { if (array_key_exists($feature, $this->supported)) { return $this->supported[$feature]; } return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, "unknown support feature $feature", __FUNCTION__); } // }}} // {{{ function getSequenceName($sqn) /** * adds sequence name formatting to a sequence name * * @param string name of the sequence * * @return string formatted sequence name * * @access public */ function getSequenceName($sqn) { return sprintf($this->options['seqname_format'], preg_replace('/[^a-z0-9_\$.]/i', '_', $sqn)); } // }}} // {{{ function getIndexName($idx) /** * adds index name formatting to a index name * * @param string name of the index * * @return string formatted index name * * @access public */ function getIndexName($idx) { return sprintf($this->options['idxname_format'], preg_replace('/[^a-z0-9_\$]/i', '_', $idx)); } // }}} // {{{ function nextID($seq_name, $ondemand = true) /** * Returns the next free id of a sequence * * @param string name of the sequence * @param bool when true missing sequences are automatic created * * @return mixed MDB2 Error Object or id * * @access public */ function nextID($seq_name, $ondemand = true) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function lastInsertID($table = null, $field = null) /** * Returns the autoincrement ID if supported or $id or fetches the current * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) * * @param string name of the table into which a new row was inserted * @param string name of the field into which a new row was inserted * * @return mixed MDB2 Error Object or id * * @access public */ function lastInsertID($table = null, $field = null) { return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function currID($seq_name) /** * Returns the current id of a sequence * * @param string name of the sequence * * @return mixed MDB2 Error Object or id * * @access public */ function currID($seq_name) { $this->warnings[] = 'database does not support getting current sequence value, the sequence value was incremented'; return $this->nextID($seq_name); } // }}} // {{{ function queryOne($query, $type = null, $colnum = 0) /** * Execute the specified query, fetch the value from the first column of * the first row of the result set and then frees * the result set. * * @param string the SELECT query statement to be executed. * @param string optional argument that specifies the expected * datatype of the result set field, so that an eventual conversion * may be performed. The default datatype is text, meaning that no * conversion is performed * @param int the column number to fetch * * @return mixed MDB2_OK or field value on success, a MDB2 error on failure * * @access public */ function queryOne($query, $type = null, $colnum = 0) { $result = $this->query($query, $type); if (!MDB2::isResultCommon($result)) { return $result; } $one = $result->fetchOne($colnum); $result->free(); return $one; } // }}} // {{{ function queryRow($query, $types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT) /** * Execute the specified query, fetch the values from the first * row of the result set into an array and then frees * the result set. * * @param string the SELECT query statement to be executed. * @param array optional array argument that specifies a list of * expected datatypes of the result set columns, so that the eventual * conversions may be performed. The default list of datatypes is * empty, meaning that no conversion is performed. * @param int how the array data should be indexed * * @return mixed MDB2_OK or data array on success, a MDB2 error on failure * * @access public */ function queryRow($query, $types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT) { $result = $this->query($query, $types); if (!MDB2::isResultCommon($result)) { return $result; } $row = $result->fetchRow($fetchmode); $result->free(); return $row; } // }}} // {{{ function queryCol($query, $type = null, $colnum = 0) /** * Execute the specified query, fetch the value from the first column of * each row of the result set into an array and then frees the result set. * * @param string the SELECT query statement to be executed. * @param string optional argument that specifies the expected * datatype of the result set field, so that an eventual conversion * may be performed. The default datatype is text, meaning that no * conversion is performed * @param int the row number to fetch * * @return mixed MDB2_OK or data array on success, a MDB2 error on failure * * @access public */ function queryCol($query, $type = null, $colnum = 0) { $result = $this->query($query, $type); if (!MDB2::isResultCommon($result)) { return $result; } $col = $result->fetchCol($colnum); $result->free(); return $col; } // }}} // {{{ function queryAll($query, $types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT, $rekey = false, $force_array = false, $group = false) /** * Execute the specified query, fetch all the rows of the result set into * a two dimensional array and then frees the result set. * * @param string the SELECT query statement to be executed. * @param array optional array argument that specifies a list of * expected datatypes of the result set columns, so that the eventual * conversions may be performed. The default list of datatypes is * empty, meaning that no conversion is performed. * @param int how the array data should be indexed * @param bool if set to true, the $all will have the first * column as its first dimension * @param bool used only when the query returns exactly * two columns. If true, the values of the returned array will be * one-element arrays instead of scalars. * @param bool if true, the values of the returned array is * wrapped in another array. If the same key value (in the first * column) repeats itself, the values will be appended to this array * instead of overwriting the existing values. * * @return mixed MDB2_OK or data array on success, a MDB2 error on failure * * @access public */ function queryAll($query, $types = null, $fetchmode = MDB2_FETCHMODE_DEFAULT, $rekey = false, $force_array = false, $group = false) { $result = $this->query($query, $types); if (!MDB2::isResultCommon($result)) { return $result; } $all = $result->fetchAll($fetchmode, $rekey, $force_array, $group); $result->free(); return $all; } // }}} } // }}} // {{{ class MDB2_Result /** * The dummy class that all user space result classes should extend from * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Result { } // }}} // {{{ class MDB2_Result_Common extends MDB2_Result /** * The common result class for MDB2 result objects * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Result_Common extends MDB2_Result { // {{{ Variables (Properties) var $db; var $result; var $rownum = -1; var $types = array(); var $values = array(); var $offset; var $offset_count = 0; var $limit; var $column_names; // }}} // {{{ constructor: function __construct(&$db, &$result, $limit = 0, $offset = 0) /** * Constructor */ function __construct(&$db, &$result, $limit = 0, $offset = 0) { $this->db =& $db; $this->result =& $result; $this->offset = $offset; $this->limit = max(0, $limit - 1); } // }}} // {{{ function MDB2_Result_Common(&$db, &$result, $limit = 0, $offset = 0) /** * PHP 4 Constructor */ function MDB2_Result_Common(&$db, &$result, $limit = 0, $offset = 0) { $this->__construct($db, $result, $limit, $offset); } // }}} // {{{ function setResultTypes($types) /** * Define the list of types to be associated with the columns of a given * result set. * * This function may be called before invoking fetchRow(), fetchOne(), * fetchCol() and fetchAll() so that the necessary data type * conversions are performed on the data to be retrieved by them. If this * function is not called, the type of all result set columns is assumed * to be text, thus leading to not perform any conversions. * * @param array variable that lists the * data types to be expected in the result set columns. If this array * contains less types than the number of columns that are returned * in the result set, the remaining columns are assumed to be of the * type text. Currently, the types clob and blob are not fully * supported. * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function setResultTypes($types) { $load = $this->db->loadModule('Datatype', null, true); if (PEAR::isError($load)) { return $load; } $types = $this->db->datatype->checkResultTypes($types); if (PEAR::isError($types)) { return $types; } $this->types = $types; return MDB2_OK; } // }}} // {{{ function seek($rownum = 0) /** * Seek to a specific row in a result set * * @param int number of the row where the data can be found * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function seek($rownum = 0) { $target_rownum = $rownum - 1; if ($this->rownum > $target_rownum) { return $this->db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'seeking to previous rows not implemented', __FUNCTION__); } while ($this->rownum < $target_rownum) { $this->fetchRow(); } return MDB2_OK; } // }}} // {{{ function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null) /** * Fetch and return a row of data * * @param int how the array data should be indexed * @param int number of the row where the data can be found * * @return int data array on success, a MDB2 error on failure * * @access public */ function &fetchRow($fetchmode = MDB2_FETCHMODE_DEFAULT, $rownum = null) { $err =& $this->db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); return $err; } // }}} // {{{ function fetchOne($colnum = 0) /** * fetch single column from the next row from a result set * * @param int the column number to fetch * @param int number of the row where the data can be found * * @return string data on success, a MDB2 error on failure * * @access public */ function fetchOne($colnum = 0, $rownum = null) { $fetchmode = is_numeric($colnum) ? MDB2_FETCHMODE_ORDERED : MDB2_FETCHMODE_ASSOC; $row = $this->fetchRow($fetchmode, $rownum); if (!is_array($row) || PEAR::isError($row)) { return $row; } if (!array_key_exists($colnum, $row)) { return $this->db->raiseError(MDB2_ERROR_TRUNCATED, null, null, 'column is not defined in the result set: '.$colnum, __FUNCTION__); } return $row[$colnum]; } // }}} // {{{ function fetchCol($colnum = 0) /** * Fetch and return a column from the current row pointer position * * @param int the column number to fetch * * @return mixed data array on success, a MDB2 error on failure * * @access public */ function fetchCol($colnum = 0) { $column = array(); $fetchmode = is_numeric($colnum) ? MDB2_FETCHMODE_ORDERED : MDB2_FETCHMODE_ASSOC; $row = $this->fetchRow($fetchmode); if (is_array($row)) { if (!array_key_exists($colnum, $row)) { return $this->db->raiseError(MDB2_ERROR_TRUNCATED, null, null, 'column is not defined in the result set: '.$colnum, __FUNCTION__); } do { $column[] = $row[$colnum]; } while (is_array($row = $this->fetchRow($fetchmode))); } if (PEAR::isError($row)) { return $row; } return $column; } // }}} // {{{ function fetchAll($fetchmode = MDB2_FETCHMODE_DEFAULT, $rekey = false, $force_array = false, $group = false) /** * Fetch and return all rows from the current row pointer position * * @param int $fetchmode the fetch mode to use: * + MDB2_FETCHMODE_ORDERED * + MDB2_FETCHMODE_ASSOC * + MDB2_FETCHMODE_ORDERED | MDB2_FETCHMODE_FLIPPED * + MDB2_FETCHMODE_ASSOC | MDB2_FETCHMODE_FLIPPED * @param bool if set to true, the $all will have the first * column as its first dimension * @param bool used only when the query returns exactly * two columns. If true, the values of the returned array will be * one-element arrays instead of scalars. * @param bool if true, the values of the returned array is * wrapped in another array. If the same key value (in the first * column) repeats itself, the values will be appended to this array * instead of overwriting the existing values. * * @return mixed data array on success, a MDB2 error on failure * * @access public * @see getAssoc() */ function fetchAll($fetchmode = MDB2_FETCHMODE_DEFAULT, $rekey = false, $force_array = false, $group = false) { $all = array(); $row = $this->fetchRow($fetchmode); if (PEAR::isError($row)) { return $row; } elseif (!$row) { return $all; } $shift_array = $rekey ? false : null; if (!is_null($shift_array)) { if (is_object($row)) { $colnum = count(get_object_vars($row)); } else { $colnum = count($row); } if ($colnum < 2) { return $this->db->raiseError(MDB2_ERROR_TRUNCATED, null, null, 'rekey feature requires atleast 2 column', __FUNCTION__); } $shift_array = (!$force_array && $colnum == 2); } if ($rekey) { do { if (is_object($row)) { $arr = get_object_vars($row); $key = reset($arr); unset($row->{$key}); } else { if ($fetchmode & MDB2_FETCHMODE_ASSOC) { $key = reset($row); unset($row[key($row)]); } else { $key = array_shift($row); } if ($shift_array) { $row = array_shift($row); } } if ($group) { $all[$key][] = $row; } else { $all[$key] = $row; } } while (($row = $this->fetchRow($fetchmode))); } elseif ($fetchmode & MDB2_FETCHMODE_FLIPPED) { do { foreach ($row as $key => $val) { $all[$key][] = $val; } } while (($row = $this->fetchRow($fetchmode))); } else { do { $all[] = $row; } while (($row = $this->fetchRow($fetchmode))); } return $all; } // }}} // {{{ function rowCount() /** * Returns the actual row number that was last fetched (count from 0) * @return int * * @access public */ function rowCount() { return $this->rownum + 1; } // }}} // {{{ function numRows() /** * Returns the number of rows in a result object * * @return mixed MDB2 Error Object or the number of rows * * @access public */ function numRows() { return $this->db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function nextResult() /** * Move the internal result pointer to the next available result * * @param a valid result resource * * @return true on success, false if there is no more result set or an error object on failure * * @access public */ function nextResult() { return $this->db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function getColumnNames() /** * Retrieve the names of columns returned by the DBMS in a query result or * from the cache. * * @param bool If set to true the values are the column names, * otherwise the names of the columns are the keys. * @return mixed Array variable that holds the names of columns or an * MDB2 error on failure. * Some DBMS may not return any columns when the result set * does not contain any rows. * * @access public */ function getColumnNames($flip = false) { if (!isset($this->column_names)) { $result = $this->_getColumnNames(); if (PEAR::isError($result)) { return $result; } $this->column_names = $result; } if ($flip) { return array_flip($this->column_names); } return $this->column_names; } // }}} // {{{ function _getColumnNames() /** * Retrieve the names of columns returned by the DBMS in a query result. * * @return mixed Array variable that holds the names of columns as keys * or an MDB2 error on failure. * Some DBMS may not return any columns when the result set * does not contain any rows. * * @access private */ function _getColumnNames() { return $this->db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function numCols() /** * Count the number of columns returned by the DBMS in a query result. * * @return mixed integer value with the number of columns, a MDB2 error * on failure * * @access public */ function numCols() { return $this->db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } // }}} // {{{ function getResource() /** * return the resource associated with the result object * * @return resource * * @access public */ function getResource() { return $this->result; } // }}} // {{{ function bindColumn($column, &$value, $type = null) /** * Set bind variable to a column. * * @param int column number or name * @param mixed variable reference * @param string specifies the type of the field * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function bindColumn($column, &$value, $type = null) { if (!is_numeric($column)) { $column_names = $this->getColumnNames(); if ($this->db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { if ($this->db->options['field_case'] == CASE_LOWER) { $column = strtolower($column); } else { $column = strtoupper($column); } } $column = $column_names[$column]; } $this->values[$column] =& $value; if (!is_null($type)) { $this->types[$column] = $type; } return MDB2_OK; } // }}} // {{{ function _assignBindColumns($row) /** * Bind a variable to a value in the result row. * * @param array row data * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access private */ function _assignBindColumns($row) { $row = array_values($row); foreach ($row as $column => $value) { if (array_key_exists($column, $this->values)) { $this->values[$column] = $value; } } return MDB2_OK; } // }}} // {{{ function free() /** * Free the internal resources associated with result. * * @return bool true on success, false if result is invalid * * @access public */ function free() { $this->result = false; return MDB2_OK; } // }}} } // }}} // {{{ class MDB2_Row /** * The simple class that accepts row data as an array * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Row { // {{{ constructor: function __construct(&$row) /** * constructor * * @param resource row data as array */ function __construct(&$row) { foreach ($row as $key => $value) { $this->$key = &$row[$key]; } } // }}} // {{{ function MDB2_Row(&$row) /** * PHP 4 Constructor * * @param resource row data as array */ function MDB2_Row(&$row) { $this->__construct($row); } // }}} } // }}} // {{{ class MDB2_Statement_Common /** * The common statement class for MDB2 statement objects * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Statement_Common { // {{{ Variables (Properties) var $db; var $statement; var $query; var $result_types; var $types; var $values = array(); var $limit; var $offset; var $is_manip; // }}} // {{{ constructor: function __construct(&$db, &$statement, $positions, $query, $types, $result_types, $is_manip = false, $limit = null, $offset = null) /** * Constructor */ function __construct(&$db, &$statement, $positions, $query, $types, $result_types, $is_manip = false, $limit = null, $offset = null) { $this->db =& $db; $this->statement =& $statement; $this->positions = $positions; $this->query = $query; $this->types = (array)$types; $this->result_types = (array)$result_types; $this->limit = $limit; $this->is_manip = $is_manip; $this->offset = $offset; } // }}} // {{{ function MDB2_Statement_Common(&$db, &$statement, $positions, $query, $types, $result_types, $is_manip = false, $limit = null, $offset = null) /** * PHP 4 Constructor */ function MDB2_Statement_Common(&$db, &$statement, $positions, $query, $types, $result_types, $is_manip = false, $limit = null, $offset = null) { $this->__construct($db, $statement, $positions, $query, $types, $result_types, $is_manip, $limit, $offset); } // }}} // {{{ function bindValue($parameter, &$value, $type = null) /** * Set the value of a parameter of a prepared query. * * @param int the order number of the parameter in the query * statement. The order number of the first parameter is 1. * @param mixed value that is meant to be assigned to specified * parameter. The type of the value depends on the $type argument. * @param string specifies the type of the field * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function bindValue($parameter, $value, $type = null) { if (!is_numeric($parameter)) { $parameter = preg_replace('/^:(.*)$/', '\\1', $parameter); } if (!in_array($parameter, $this->positions)) { return $this->db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'Unable to bind to missing placeholder: '.$parameter, __FUNCTION__); } $this->values[$parameter] = $value; if (!is_null($type)) { $this->types[$parameter] = $type; } return MDB2_OK; } // }}} // {{{ function bindValueArray($values, $types = null) /** * Set the values of multiple a parameter of a prepared query in bulk. * * @param array specifies all necessary information * for bindValue() the array elements must use keys corresponding to * the number of the position of the parameter. * @param array specifies the types of the fields * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public * @see bindParam() */ function bindValueArray($values, $types = null) { $types = is_array($types) ? array_values($types) : array_fill(0, count($values), null); $parameters = array_keys($values); foreach ($parameters as $key => $parameter) { $err = $this->bindValue($parameter, $values[$parameter], $types[$key]); if (PEAR::isError($err)) { return $err; } } return MDB2_OK; } // }}} // {{{ function bindParam($parameter, &$value, $type = null) /** * Bind a variable to a parameter of a prepared query. * * @param int the order number of the parameter in the query * statement. The order number of the first parameter is 1. * @param mixed variable that is meant to be bound to specified * parameter. The type of the value depends on the $type argument. * @param string specifies the type of the field * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function bindParam($parameter, &$value, $type = null) { if (!is_numeric($parameter)) { $parameter = preg_replace('/^:(.*)$/', '\\1', $parameter); } if (!in_array($parameter, $this->positions)) { return $this->db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'Unable to bind to missing placeholder: '.$parameter, __FUNCTION__); } $this->values[$parameter] =& $value; if (!is_null($type)) { $this->types[$parameter] = $type; } return MDB2_OK; } // }}} // {{{ function bindParamArray(&$values, $types = null) /** * Bind the variables of multiple a parameter of a prepared query in bulk. * * @param array specifies all necessary information * for bindParam() the array elements must use keys corresponding to * the number of the position of the parameter. * @param array specifies the types of the fields * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public * @see bindParam() */ function bindParamArray(&$values, $types = null) { $types = is_array($types) ? array_values($types) : array_fill(0, count($values), null); $parameters = array_keys($values); foreach ($parameters as $key => $parameter) { $err = $this->bindParam($parameter, $values[$parameter], $types[$key]); if (PEAR::isError($err)) { return $err; } } return MDB2_OK; } // }}} // {{{ function &execute($values = null, $result_class = true, $result_wrap_class = false) /** * Execute a prepared query statement. * * @param array specifies all necessary information * for bindParam() the array elements must use keys corresponding to * the number of the position of the parameter. * @param mixed specifies which result class to use * @param mixed specifies which class to wrap results in * * @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure * * @access public */ function &execute($values = null, $result_class = true, $result_wrap_class = false) { if (is_null($this->positions)) { return $this->db->raiseError(MDB2_ERROR, null, null, 'Prepared statement has already been freed', __FUNCTION__); } $values = (array)$values; if (!empty($values)) { $this->bindValueArray($values); } $result =& $this->_execute($result_class, $result_wrap_class); return $result; } // }}} // {{{ function &_execute($result_class = true, $result_wrap_class = false) /** * Execute a prepared query statement helper method. * * @param mixed specifies which result class to use * @param mixed specifies which class to wrap results in * * @return mixed MDB2_Result or integer on success, a MDB2 error on failure * * @access private */ function &_execute($result_class = true, $result_wrap_class = false) { $this->last_query = $this->query; $query = ''; $last_position = 0; foreach ($this->positions as $current_position => $parameter) { if (!array_key_exists($parameter, $this->values)) { return $this->db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'Unable to bind to missing placeholder: '.$parameter, __FUNCTION__); } $value = $this->values[$parameter]; $query.= substr($this->query, $last_position, $current_position - $last_position); if (!isset($value)) { $value_quoted = 'NULL'; } else { $type = !empty($this->types[$parameter]) ? $this->types[$parameter] : null; $value_quoted = $this->db->quote($value, $type); if (PEAR::isError($value_quoted)) { return $value_quoted; } } $query.= $value_quoted; $last_position = $current_position + 1; } $query.= substr($this->query, $last_position); $this->db->offset = $this->offset; $this->db->limit = $this->limit; if ($this->is_manip) { $result = $this->db->exec($query); } else { $result =& $this->db->query($query, $this->result_types, $result_class, $result_wrap_class); } return $result; } // }}} // {{{ function free() /** * Release resources allocated for the specified prepared query. * * @return mixed MDB2_OK on success, a MDB2 error on failure * * @access public */ function free() { if (is_null($this->positions)) { return $this->db->raiseError(MDB2_ERROR, null, null, 'Prepared statement has already been freed', __FUNCTION__); } $this->statement = null; $this->positions = null; $this->query = null; $this->types = null; $this->result_types = null; $this->limit = null; $this->is_manip = null; $this->offset = null; $this->values = null; return MDB2_OK; } // }}} } // }}} // {{{ class MDB2_Module_Common /** * The common modules class for MDB2 module objects * * @package MDB2 * @category Database * @author Lukas Smith */ class MDB2_Module_Common { // {{{ Variables (Properties) /** * contains the key to the global MDB2 instance array of the associated * MDB2 instance * * @var int * @access protected */ var $db_index; // }}} // {{{ constructor: function __construct($db_index) /** * Constructor */ function __construct($db_index) { $this->db_index = $db_index; } // }}} // {{{ function MDB2_Module_Common($db_index) /** * PHP 4 Constructor */ function MDB2_Module_Common($db_index) { $this->__construct($db_index); } // }}} // {{{ function &getDBInstance() /** * Get the instance of MDB2 associated with the module instance * * @return object MDB2 instance or a MDB2 error on failure * * @access public */ function &getDBInstance() { if (isset($GLOBALS['_MDB2_databases'][$this->db_index])) { $result =& $GLOBALS['_MDB2_databases'][$this->db_index]; } else { $result =& MDB2::raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'could not find MDB2 instance'); } return $result; } // }}} } // }}} // {{{ function MDB2_closeOpenTransactions() /** * Close any open transactions form persistent connections * * @return void * * @access public */ function MDB2_closeOpenTransactions() { reset($GLOBALS['_MDB2_databases']); while (next($GLOBALS['_MDB2_databases'])) { $key = key($GLOBALS['_MDB2_databases']); if ($GLOBALS['_MDB2_databases'][$key]->opened_persistent && $GLOBALS['_MDB2_databases'][$key]->in_transaction ) { $GLOBALS['_MDB2_databases'][$key]->rollback(); } } } // }}} // {{{ function MDB2_defaultDebugOutput(&$db, $scope, $message, $is_manip = null) /** * default debug output handler * * @param object reference to an MDB2 database object * @param string usually the method name that triggered the debug call: * for example 'query', 'prepare', 'execute', 'parameters', * 'beginTransaction', 'commit', 'rollback' * @param string message that should be appended to the debug variable * @param array contains context information about the debug() call * common keys are: is_manip, time, result etc. * * @return void|string optionally return a modified message, this allows * rewriting a query before being issued or prepared * * @access public */ function MDB2_defaultDebugOutput(&$db, $scope, $message, $context = array()) { $db->debug_output.= $scope.'('.$db->db_index.'): '; $db->debug_output.= $message.$db->getOption('log_line_break'); return $message; } // }}} ?>catalog/libs/PEAR/Net/0000755577340101002240000000000010625430047016364 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/Net/UserAgent/0000755577340101002240000000000010625430050020253 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/Net/UserAgent/Detect.php0000644577340101002240000011610310625430061022200 0ustar tonerlogicspg11675700000000000000 | // | Jason Rust | // +----------------------------------------------------------------------+ // $Id: Detect.php,v 1.23 2006/04/19 18:23:38 jrust Exp $ // }}} // {{{ constants define('NET_USERAGENT_DETECT_BROWSER', 'browser'); define('NET_USERAGENT_DETECT_OS', 'os'); define('NET_USERAGENT_DETECT_FEATURES', 'features'); define('NET_USERAGENT_DETECT_QUIRKS', 'quirks'); define('NET_USERAGENT_DETECT_ACCEPT', 'accept'); define('NET_USERAGENT_DETECT_ALL', 'all'); // }}} // {{{ class Net_UserAgent_Detect /** * The Net_UserAgent_Detect object does a number of tests on an HTTP user * agent string. The results of these tests are available via methods of * the object. Note that all methods in this class can be called * statically. The constructor and singleton methods are only retained * for BC. * * This module is based upon the JavaScript browser detection code * available at http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html. * This module had many influences from the lib/Browser.php code in * version 1.3 of Horde. * * @author Jason Rust * @author Dan Allen * @author Chuck Hagenbuch * @author Jon Parise * @package Net_UserAgent */ // }}} class Net_UserAgent_Detect { // {{{ constructor function Net_UserAgent_Detect($in_userAgent = null, $in_detect = null) { $this->detect($in_userAgent, $in_detect); } // }}} // {{{ singleton /** * To be used in place of the contructor to return only open instance. * * @access public * @return object Net_UserAgent_Detect instance */ function &singleton($in_userAgent = null, $in_detect = null) { static $instance; if (!isset($instance)) { $instance = new Net_UserAgent_Detect($in_userAgent, $in_detect); } return $instance; } // }}} // {{{ detect() /** * Detect the user agent and prepare flags, features and quirks * based on what is found * * This is the core of the Net_UserAgent_Detect class. It moves its * way through the user agent string setting up the flags based on * the vendors and versions of the browsers, determining the OS and * setting up the features and quirks owned by each of the relevant * clients. Note that if you are going to be calling methods of * this class statically then set all the parameters using th * setOption() * * @param string $in_userAgent (optional) User agent override. * @param mixed $in_detect (optional) The level of checking to do. * * @access public * @return void */ function detect($in_userAgent = null, $in_detect = null) { static $hasRun; $options = &Net_UserAgent_Detect::_getStaticProperty('options'); if (!empty($hasRun) && empty($options['re-evaluate'])) { return; } $hasRun = true; // {{{ set up static properties $in_userAgent = isset($options['userAgent']) && is_null($in_userAgent) ? $options['userAgent'] : null; $in_detect = isset($options['detectOptions']) && is_null($in_detect) ? $options['detectOptions'] : null; // User agent string that is being analyzed $userAgent = &Net_UserAgent_Detect::_getStaticProperty('userAgent'); // Array that stores all of the flags for the vendor and version // of the different browsers $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); $browser = array_flip(array('ns', 'ns2', 'ns3', 'ns4', 'ns4up', 'nav', 'ns6', 'belowns6', 'ns6up', 'firefox', 'firefox0.x', 'firefox1.x', 'gecko', 'ie', 'ie3', 'ie4', 'ie4up', 'ie5', 'ie5_5', 'ie5up', 'ie6', 'belowie6', 'ie6up', 'ie7', 'ie7up', 'opera', 'opera2', 'opera3', 'opera4', 'opera5', 'opera6', 'opera7', 'opera8', 'opera5up', 'opera6up', 'opera7up', 'belowopera8', 'opera8up', 'aol', 'aol3', 'aol4', 'aol5', 'aol6', 'aol7', 'aol8', 'webtv', 'aoltv', 'tvnavigator', 'hotjava', 'hotjava3', 'hotjava3up', 'konq', 'safari', 'netgem', 'webdav', 'icab')); // Array that stores all of the flags for the operating systems, // and in some cases the versions of those operating systems (windows) $os = &Net_UserAgent_Detect::_getStaticProperty('os'); $os = array_flip(array('win', 'win95', 'win16', 'win31', 'win9x', 'win98', 'winme', 'win2k', 'winxp', 'winnt', 'win2003', 'os2', 'mac', 'mac68k', 'macppc', 'linux', 'unix', 'vms', 'sun', 'sun4', 'sun5', 'suni86', 'irix', 'irix5', 'irix6', 'hpux', 'hpux9', 'hpux10', 'aix', 'aix1', 'aix2', 'aix3', 'aix4', 'sco', 'unixware', 'mpras', 'reliant', 'dec', 'sinix', 'freebsd', 'bsd')); // Array which stores known issues with the given client that can // be used for on the fly tweaking so that the client may recieve // the proper handling of this quirk. $quirks = &Net_UserAgent_Detect::_getStaticProperty('quirks'); $quirks = array( 'must_cache_forms' => false, 'popups_disabled' => false, 'empty_file_input_value' => false, 'cache_ssl_downloads' => false, 'scrollbar_in_way' => false, 'break_disposition_header' => false, 'nested_table_render_bug' => false); // Array that stores credentials for each of the browser/os // combinations. These allow quick access to determine if the // current client has a feature that is going to be implemented // in the script. $features = &Net_UserAgent_Detect::_getStaticProperty('features'); $features = array( 'javascript' => false, 'dhtml' => false, 'dom' => false, 'sidebar' => false, 'gecko' => false, 'ajax' => false); // The leading identifier is the very first term in the user // agent string, which is used to identify clients which are not // Mosaic-based browsers. $leadingIdentifier = &Net_UserAgent_Detect::_getStaticProperty('leadingIdentifier'); // The full version of the client as supplied by the very first // numbers in the user agent $version = &Net_UserAgent_Detect::_getStaticProperty('version'); $version = 0; // The major part of the client version, which is the integer // value of the version. $majorVersion = &Net_UserAgent_Detect::_getStaticProperty('majorVersion'); $majorVersion = 0; // The minor part of the client version, which is the decimal // parts of the version $subVersion = &Net_UserAgent_Detect::_getStaticProperty('subVersion'); $subVersion = 0; // }}} // detemine what user agent we are using if (is_null($in_userAgent)) { if (isset($_SERVER['HTTP_USER_AGENT'])) { $userAgent = $_SERVER['HTTP_USER_AGENT']; } elseif (isset($GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'])) { $userAgent = $GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']; } else { $userAgent = ''; } } else { $userAgent = $in_userAgent; } // get the lowercase version for case-insensitive searching $agt = strtolower($userAgent); // figure out what we need to look for $detectOptions = array(NET_USERAGENT_DETECT_BROWSER, NET_USERAGENT_DETECT_OS, NET_USERAGENT_DETECT_FEATURES, NET_USERAGENT_DETECT_QUIRKS, NET_USERAGENT_DETECT_ACCEPT, NET_USERAGENT_DETECT_ALL); $detect = is_null($in_detect) ? NET_USERAGENT_DETECT_ALL : $in_detect; settype($detect, 'array'); foreach($detectOptions as $option) { if (in_array($option, $detect)) { $detectFlags[$option] = true; } else { $detectFlags[$option] = false; } } // initialize the arrays of browsers and operating systems // Get the type and version of the client if (preg_match(";^([[:alnum:]]+)[ /\(]*[[:alpha:]]*([\d]*)(\.[\d\.]*);", $agt, $matches)) { list(, $leadingIdentifier, $majorVersion, $subVersion) = $matches; } if (empty($leadingIdentifier)) { $leadingIdentifier = 'Unknown'; } $version = $majorVersion . $subVersion; // Browser type if ($detectFlags[NET_USERAGENT_DETECT_ALL] || $detectFlags[NET_USERAGENT_DETECT_BROWSER]) { $browser['webdav'] = ($agt == 'microsoft data access internet publishing provider dav' || $agt == 'microsoft data access internet publishing provider protocol discovery'); $browser['konq'] = $browser['safari'] = (strpos($agt, 'konqueror') !== false || strpos($agt, 'safari') !== false); $browser['text'] = strpos($agt, 'links') !== false || strpos($agt, 'lynx') !== false || strpos($agt, 'w3m') !== false; $browser['ns'] = strpos($agt, 'mozilla') !== false && !(strpos($agt, 'spoofer') !== false) && !(strpos($agt, 'compatible') !== false) && !(strpos($agt, 'hotjava') !== false) && !(strpos($agt, 'opera') !== false) && !(strpos($agt, 'webtv') !== false) ? 1 : 0; $browser['netgem'] = strpos($agt, 'netgem') !== false; $browser['icab'] = strpos($agt, 'icab') !== false; $browser['ns2'] = $browser['ns'] && $majorVersion == 2; $browser['ns3'] = $browser['ns'] && $majorVersion == 3; $browser['ns4'] = $browser['ns'] && $majorVersion == 4; $browser['ns4up'] = $browser['ns'] && $majorVersion >= 4; // determine if this is a Netscape Navigator $browser['nav'] = $browser['belowns6'] = $browser['ns'] && $majorVersion < 5; $browser['ns6'] = !$browser['konq'] && $browser['ns'] && $majorVersion == 5; $browser['ns6up'] = $browser['ns6'] && $majorVersion >= 5; $browser['gecko'] = strpos($agt, 'gecko') !== false && !$browser['konq']; $browser['firefox'] = $browser['gecko'] && strpos($agt, 'firefox') !== false; $browser['firefox0.x'] = $browser['firefox'] && strpos($agt, 'firefox/0.') !== false; $browser['firefox1.x'] = $browser['firefox'] && strpos($agt, 'firefox/1.') !== false; $browser['ie'] = strpos($agt, 'msie') !== false && !(strpos($agt, 'opera') !== false); $browser['ie3'] = $browser['ie'] && $majorVersion < 4; $browser['ie4'] = $browser['ie'] && $majorVersion == 4 && (strpos($agt, 'msie 4') !== false); $browser['ie4up'] = $browser['ie'] && !$browser['ie3']; $browser['ie5'] = $browser['ie4up'] && (strpos($agt, 'msie 5') !== false); $browser['ie5_5'] = $browser['ie4up'] && (strpos($agt, 'msie 5.5') !== false); $browser['ie5up'] = $browser['ie4up'] && !$browser['ie3'] && !$browser['ie4']; $browser['ie5_5up'] = $browser['ie5up'] && !$browser['ie5']; $browser['ie6'] = strpos($agt, 'msie 6') !== false; $browser['ie6up'] = $browser['ie5up'] && !$browser['ie5'] && !$browser['ie5_5']; $browser['ie7'] = strpos($agt, 'msie 7') !== false; $browser['ie7up'] = $browser['ie6up'] && !$browser['ie6']; $browser['belowie6']= $browser['ie'] && !$browser['ie6up']; $browser['opera'] = strpos($agt, 'opera') !== false; $browser['opera2'] = strpos($agt, 'opera 2') !== false || strpos($agt, 'opera/2') !== false; $browser['opera3'] = strpos($agt, 'opera 3') !== false || strpos($agt, 'opera/3') !== false; $browser['opera4'] = strpos($agt, 'opera 4') !== false || strpos($agt, 'opera/4') !== false; $browser['opera5'] = strpos($agt, 'opera 5') !== false || strpos($agt, 'opera/5') !== false; $browser['opera6'] = strpos($agt, 'opera 6') !== false || strpos($agt, 'opera/6') !== false; $browser['opera7'] = strpos($agt, 'opera 7') !== false || strpos($agt, 'opera/7') !== false; $browser['opera8'] = strpos($agt, 'opera 8') !== false || strpos($agt, 'opera/8') !== false; $browser['opera5up'] = $browser['opera'] && !$browser['opera2'] && !$browser['opera3'] && !$browser['opera4']; $browser['opera6up'] = $browser['opera'] && !$browser['opera2'] && !$browser['opera3'] && !$browser['opera4'] && !$browser['opera5']; $browser['opera7up'] = $browser['opera'] && !$browser['opera2'] && !$browser['opera3'] && !$browser['opera4'] && !$browser['opera5'] && !$browser['opera6']; $browser['opera8up'] = $browser['opera'] && !$browser['opera2'] && !$browser['opera3'] && !$browser['opera4'] && !$browser['opera5'] && !$browser['opera6'] && !$browser['opera7']; $browser['belowopera8'] = $browser['opera'] && !$browser['opera8up']; $browser['aol'] = strpos($agt, 'aol') !== false; $browser['aol3'] = $browser['aol'] && $browser['ie3']; $browser['aol4'] = $browser['aol'] && $browser['ie4']; $browser['aol5'] = strpos($agt, 'aol 5') !== false; $browser['aol6'] = strpos($agt, 'aol 6') !== false; $browser['aol7'] = strpos($agt, 'aol 7') !== false || strpos($agt, 'aol7') !== false; $browser['aol8'] = strpos($agt, 'aol 8') !== false || strpos($agt, 'aol8') !== false; $browser['webtv'] = strpos($agt, 'webtv') !== false; $browser['aoltv'] = $browser['tvnavigator'] = strpos($agt, 'navio') !== false || strpos($agt, 'navio_aoltv') !== false; $browser['hotjava'] = strpos($agt, 'hotjava') !== false; $browser['hotjava3'] = $browser['hotjava'] && $majorVersion == 3; $browser['hotjava3up'] = $browser['hotjava'] && $majorVersion >= 3; } if ($detectFlags[NET_USERAGENT_DETECT_ALL] || ($detectFlags[NET_USERAGENT_DETECT_BROWSER] && $detectFlags[NET_USERAGENT_DETECT_FEATURES])) { // Javascript Check if ($browser['ns2'] || $browser['ie3']) { Net_UserAgent_Detect::setFeature('javascript', 1.0); } elseif ($browser['opera5up']) { Net_UserAgent_Detect::setFeature('javascript', 1.3); } elseif ($browser['opera'] || $browser['ns3']) { Net_UserAgent_Detect::setFeature('javascript', 1.1); } elseif (($browser['ns4'] && ($version <= 4.05)) || $browser['ie4']) { Net_UserAgent_Detect::setFeature('javascript', 1.2); } elseif (($browser['ie5up'] && strpos($agt, 'mac') !== false) || $browser['konq']) { Net_UserAgent_Detect::setFeature('javascript', 1.4); } // I can't believe IE6 still has javascript 1.3, what a shitty browser elseif (($browser['ns4'] && ($version > 4.05)) || $browser['ie5up'] || $browser['hotjava3up']) { Net_UserAgent_Detect::setFeature('javascript', 1.3); } elseif ($browser['ns6up'] || $browser['gecko'] || $browser['netgem']) { Net_UserAgent_Detect::setFeature('javascript', 1.5); } } /** OS Check **/ if ($detectFlags[NET_USERAGENT_DETECT_ALL] || $detectFlags[NET_USERAGENT_DETECT_OS]) { $os['win'] = strpos($agt, 'win') !== false || strpos($agt, '16bit') !== false; $os['win95'] = strpos($agt, 'win95') !== false || strpos($agt, 'windows 95') !== false; $os['win16'] = strpos($agt, 'win16') !== false || strpos($agt, '16bit') !== false || strpos($agt, 'windows 3.1') !== false || strpos($agt, 'windows 16-bit') !== false; $os['win31'] = strpos($agt, 'windows 3.1') !== false || strpos($agt, 'win16') !== false || strpos($agt, 'windows 16-bit') !== false; $os['winme'] = strpos($agt, 'win 9x 4.90') !== false; $os['win2k'] = strpos($agt, 'windows nt 5.0') !== false; $os['winxp'] = strpos($agt, 'windows nt 5.1') !== false; $os['win2003'] = strpos($agt, 'windows nt 5.2') !== false; $os['win98'] = strpos($agt, 'win98') !== false || strpos($agt, 'windows 98') !== false; $os['win9x'] = $os['win95'] || $os['win98']; $os['winnt'] = (strpos($agt, 'winnt') !== false || strpos($agt, 'windows nt') !== false) && strpos($agt, 'windows nt 5') === false; $os['win32'] = $os['win95'] || $os['winnt'] || $os['win98'] || $majorVersion >= 4 && strpos($agt, 'win32') !== false || strpos($agt, '32bit') !== false; $os['os2'] = strpos($agt, 'os/2') !== false || strpos($agt, 'ibm-webexplorer') !== false; $os['mac'] = strpos($agt, 'mac') !== false; $os['mac68k'] = $os['mac'] && (strpos($agt, '68k') !== false || strpos($agt, '68000') !== false); $os['macppc'] = $os['mac'] && (strpos($agt, 'ppc') !== false || strpos($agt, 'powerpc') !== false); $os['sun'] = strpos($agt, 'sunos') !== false; $os['sun4'] = strpos($agt, 'sunos 4') !== false; $os['sun5'] = strpos($agt, 'sunos 5') !== false; $os['suni86'] = $os['sun'] && strpos($agt, 'i86') !== false; $os['irix'] = strpos($agt, 'irix') !== false; $os['irix5'] = strpos($agt, 'irix 5') !== false; $os['irix6'] = strpos($agt, 'irix 6') !== false || strpos($agt, 'irix6') !== false; $os['hpux'] = strpos($agt, 'hp-ux') !== false; $os['hpux9'] = $os['hpux'] && strpos($agt, '09.') !== false; $os['hpux10'] = $os['hpux'] && strpos($agt, '10.') !== false; $os['aix'] = strpos($agt, 'aix') !== false; $os['aix1'] = strpos($agt, 'aix 1') !== false; $os['aix2'] = strpos($agt, 'aix 2') !== false; $os['aix3'] = strpos($agt, 'aix 3') !== false; $os['aix4'] = strpos($agt, 'aix 4') !== false; $os['linux'] = strpos($agt, 'inux') !== false; $os['sco'] = strpos($agt, 'sco') !== false || strpos($agt, 'unix_sv') !== false; $os['unixware'] = strpos($agt, 'unix_system_v') !== false; $os['mpras'] = strpos($agt, 'ncr') !== false; $os['reliant'] = strpos($agt, 'reliant') !== false; $os['dec'] = strpos($agt, 'dec') !== false || strpos($agt, 'osf1') !== false || strpos($agt, 'dec_alpha') !== false || strpos($agt, 'alphaserver') !== false || strpos($agt, 'ultrix') !== false || strpos($agt, 'alphastation') !== false; $os['sinix'] = strpos($agt, 'sinix') !== false; $os['freebsd'] = strpos($agt, 'freebsd') !== false; $os['bsd'] = strpos($agt, 'bsd') !== false; $os['unix'] = strpos($agt, 'x11') !== false || strpos($agt, 'unix') !== false || $os['sun'] || $os['irix'] || $os['hpux'] || $os['sco'] || $os['unixware'] || $os['mpras'] || $os['reliant'] || $os['dec'] || $os['sinix'] || $os['aix'] || $os['linux'] || $os['bsd'] || $os['freebsd']; $os['vms'] = strpos($agt, 'vax') !== false || strpos($agt, 'openvms') !== false; } // Setup the quirks if ($detectFlags[NET_USERAGENT_DETECT_ALL] || ($detectFlags[NET_USERAGENT_DETECT_BROWSER] && $detectFlags[NET_USERAGENT_DETECT_QUIRKS])) { if ($browser['konq']) { Net_UserAgent_Detect::setQuirk('empty_file_input_value'); } if ($browser['ie']) { Net_UserAgent_Detect::setQuirk('cache_ssl_downloads'); } if ($browser['ie6']) { Net_UserAgent_Detect::setQuirk('scrollbar_in_way'); } if ($browser['ie5']) { Net_UserAgent_Detect::setQuirk('break_disposition_header'); } if ($browser['ns6']) { Net_UserAgent_Detect::setQuirk('popups_disabled'); Net_UserAgent_Detect::setQuirk('must_cache_forms'); } if ($browser['nav'] && $subVersion < .79) { Net_UserAgent_Detect::setQuirk('nested_table_render_bug'); } } // Set features if ($detectFlags[NET_USERAGENT_DETECT_ALL] || ($detectFlags[NET_USERAGENT_DETECT_BROWSER] && $detectFlags[NET_USERAGENT_DETECT_FEATURES])) { if ($browser['gecko']) { preg_match(';gecko/([\d]+)\b;i', $agt, $matches); Net_UserAgent_Detect::setFeature('gecko', $matches[1]); } if ($browser['gecko'] || $browser['ie5up'] || $browser['konq'] || $browser['opera8up']) { Net_UserAgent_Detect::setFeature('ajax'); } if ($browser['ns6up'] || $browser['opera5up'] || $browser['konq'] || $browser['netgem']) { Net_UserAgent_Detect::setFeature('dom'); } if ($browser['ie4up'] || $browser['ns4up'] || $browser['opera5up'] || $browser['konq'] || $browser['netgem']) { Net_UserAgent_Detect::setFeature('dhtml'); } } if ($detectFlags[NET_USERAGENT_DETECT_ALL] || $detectFlags[NET_USERAGENT_DETECT_ACCEPT]) { $mimetypes = preg_split(';[\s,]+;', substr(getenv('HTTP_ACCEPT'), 0, strpos(getenv('HTTP_ACCEPT') . ';', ';')), -1, PREG_SPLIT_NO_EMPTY); Net_UserAgent_Detect::setAcceptType((array) $mimetypes, 'mimetype'); $languages = preg_split(';[\s,]+;', substr(getenv('HTTP_ACCEPT_LANGUAGE'), 0, strpos(getenv('HTTP_ACCEPT_LANGUAGE') . ';', ';')), -1, PREG_SPLIT_NO_EMPTY); if (empty($languages)) { $languages = 'en'; } Net_UserAgent_Detect::setAcceptType((array) $languages, 'language'); $encodings = preg_split(';[\s,]+;', substr(getenv('HTTP_ACCEPT_ENCODING'), 0, strpos(getenv('HTTP_ACCEPT_ENCODING') . ';', ';')), -1, PREG_SPLIT_NO_EMPTY); Net_UserAgent_Detect::setAcceptType((array) $encodings, 'encoding'); $charsets = preg_split(';[\s,]+;', substr(getenv('HTTP_ACCEPT_CHARSET'), 0, strpos(getenv('HTTP_ACCEPT_CHARSET') . ';', ';')), -1, PREG_SPLIT_NO_EMPTY); Net_UserAgent_Detect::setAcceptType((array) $charsets, 'charset'); } } // }}} // {{{ setOption() /** * Sets a class option. The available settings are: * o 'userAgent' => The user agent string to detect (useful for * checking a string manually). * o 'detectOptions' => The level of checking to do. A single level * or an array of options. Default is NET_USERAGENT_DETECT_ALL. * * @param string $in_field The option field (userAgent or detectOptions) * @param mixed $in_value The value for the field */ function setOption($in_field, $in_value) { $options = &Net_UserAgent_Detect::_getStaticProperty('options'); $options[$in_field] = $in_value; } // }}} // {{{ isBrowser() /** * Look up the provide browser flag and return a boolean value * * Given one of the flags listed in the properties, this function will return * the value associated with that flag. * * @param string $in_match flag to lookup * * @access public * @return boolean whether or not the browser satisfies this flag */ function isBrowser($in_match) { Net_UserAgent_Detect::detect(); $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); return isset($browser[strtolower($in_match)]) ? $browser[strtolower($in_match)] : false; } // }}} // {{{ getBrowser() /** * Since simply returning the "browser" is somewhat ambiguous since there * are different ways to classify the browser, this function works by taking * an expect list and returning the string of the first match, so put the important * ones first in the array. * * @param array $in_expectList the browser flags to search for * * @access public * @return string first flag that matches */ function getBrowser($in_expectList) { Net_UserAgent_Detect::detect(); $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); foreach((array) $in_expectList as $brwsr) { if (!empty($browser[strtolower($brwsr)])) { return $brwsr; } } } // }}} // {{{ getBrowserString() /** * This function returns the vendor string corresponding to the flag. * * Either use the default matches or pass in an associative array of * flags and corresponding vendor strings. This function will find * the highest version flag and return the vendor string corresponding * to the appropriate flag. Be sure to pass in the flags in ascending order * if you want a basic matches first, followed by more detailed matches. * * @param array $in_vendorStrings (optional) array of flags matched with vendor strings * * @access public * @return string vendor string matches appropriate flag */ function getBrowserString($in_vendorStrings = array ( 'ie' => 'Microsoft Internet Explorer', 'ie4up' => 'Microsoft Internet Explorer 4.x', 'ie5up' => 'Microsoft Internet Explorer 5.x', 'ie6up' => 'Microsoft Internet Explorer 6.x', 'opera4' => 'Opera 4.x', 'opera5up' => 'Opera 5.x', 'nav' => 'Netscape Navigator', 'ns4' => 'Netscape 4.x', 'ns6up' => 'Mozilla/Netscape 6.x', 'firefox0.x' => 'Firefox 0.x', 'firefox1.x' => 'Firefox 1.x', 'konq' => 'Konqueror/Safari', 'netgem' => 'Netgem/iPlayer', )) { Net_UserAgent_Detect::detect(); $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); foreach((array) $in_vendorStrings as $flag => $string) { if (!empty($browser[$flag])) { $vendorString = $string; } } // if there are no matches just use the user agent leading idendifier (usually Mozilla) if (!isset($vendorString)) { $leadingIdentifier = &Net_UserAgent_Detect::_getStaticProperty('leadingIdentifier'); $vendorString = $leadingIdentifier; } return $vendorString; } // }}} // {{{ isIE() /** * Determine if the browser is an Internet Explorer browser * * @access public * @return bool whether or not this browser is an ie browser */ function isIE() { Net_UserAgent_Detect::detect(); $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); return !empty($browser['ie']); } // }}} // {{{ isNavigator() /** * Determine if the browser is a Netscape Navigator browser * * @access public * @return bool whether or not this browser is a Netscape Navigator browser */ function isNavigator() { Net_UserAgent_Detect::detect(); $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); return !empty($browser['nav']); } // }}} // {{{ isNetscape() /** * Determine if the browser is a Netscape or Mozilla browser * * Note that this function is not the same as isNavigator, since the * new Mozilla browsers are still sponsered by Netscape, and hence are * Netscape products, but not the original Navigators * * @access public * @return bool whether or not this browser is a Netscape product */ function isNetscape() { Net_UserAgent_Detect::detect(); $browser = &Net_UserAgent_Detect::_getStaticProperty('browser'); return !empty($browser['ns4up']); } // }}} // {{{ isOS() /** * Look up the provide OS flag and return a boolean value * * Given one of the flags listed in the properties, this function will return * the value associated with that flag for the operating system. * * @param string $in_match flag to lookup * * @access public * @return boolean whether or not the OS satisfies this flag */ function isOS($in_match) { Net_UserAgent_Detect::detect(); $os = &Net_UserAgent_Detect::_getStaticProperty('os'); return isset($os[strtolower($in_match)]) ? $os[strtolower($in_match)] : false; } // }}} // {{{ getOS() /** * Since simply returning the "os" is somewhat ambiguous since there * are different ways to classify the browser, this function works by taking * an expect list and returning the string of the first match, so put the important * ones first in the array. * * @access public * @return string first flag that matches */ function getOS($in_expectList) { Net_UserAgent_Detect::detect(); $os = &Net_UserAgent_Detect::_getStaticProperty('os'); foreach((array) $in_expectList as $expectOs) { if (!empty($os[strtolower($expectOs)])) { return $expectOs; } } } // }}} // {{{ getOSString() /** * This function returns the os string corresponding to the flag. * * Either use the default matches or pass in an associative array of * flags and corresponding os strings. This function will find * the highest version flag and return the os string corresponding * to the appropriate flag. Be sure to pass in the flags in ascending order * if you want a basic matches first, followed by more detailed matches. * * @param array $in_osStrings (optional) array of flags matched with os strings * * @access public * @return string os string matches appropriate flag */ function getOSString($in_osStrings = array( 'win' => 'Microsoft Windows', 'win9x' => 'Microsoft Windows 9x', 'winme' => 'Microsoft Windows Millenium', 'win2k' => 'Microsoft Windows 2000', 'winnt' => 'Microsoft Windows NT', 'winxp' => 'Microsoft Windows XP', 'win2003' => 'Microsoft Windows 2003', 'mac' => 'Macintosh', 'unix' => 'Linux/Unix', )) { Net_UserAgent_Detect::detect(); $osString = 'Unknown'; $os = &Net_UserAgent_Detect::_getStaticProperty('os'); foreach((array) $in_osStrings as $flag => $string) { if (!empty($os[$flag])) { $osString = $string; } } return $osString; } // }}} // {{{ setQuirk() /** * Set a unique behavior for the current browser. * * Many client browsers do some really funky things, and this * mechanism allows the coder to determine if an excepetion must * be made with the current client. * * @param string $in_quirk The quirk to set * @param string $in_hasQuirk (optional) Does the browser have the quirk? * * @access public * @return void */ function setQuirk($in_quirk, $in_hasQuirk = true) { $quirks = &Net_UserAgent_Detect::_getStaticProperty('quirks'); $hasQuirk = !empty($in_hasQuirk); $quirks[strtolower($in_quirk)] = $hasQuirk; } // }}} // {{{ hasQuirk() /** * Check a unique behavior for the current browser. * * Many client browsers do some really funky things, and this * mechanism allows the coder to determine if an excepetion must * be made with the current client. * * @param string $in_quirk The quirk to detect * * @access public * @return bool whether or not browser has this quirk */ function hasQuirk($in_quirk) { return (bool) Net_UserAgent_Detect::getQuirk($in_quirk); } // }}} // {{{ getQuirk() /** * Get the unique behavior for the current browser. * * Many client browsers do some really funky things, and this * mechanism allows the coder to determine if an excepetion must * be made with the current client. * * @param string $in_quirk The quirk to detect * * @access public * @return string value of the quirk, in this case usually a boolean */ function getQuirk($in_quirk) { Net_UserAgent_Detect::detect(); $quirks = &Net_UserAgent_Detect::_getStaticProperty('quirks'); return isset($quirks[strtolower($in_quirk)]) ? $quirks[strtolower($in_quirk)] : null; } // }}} // {{{ setFeature() /** * Set capabilities for the current browser. * * Since the capabilities of client browsers vary widly, this interface * helps keep track of the core features of a client, such as if the client * supports dhtml, dom, javascript, etc. * * @param string $in_feature The feature to set * @param string $in_hasFeature (optional) Does the browser have the feature? * * @access public * @return void */ function setFeature($in_feature, $in_hasFeature = true) { $features = &Net_UserAgent_Detect::_getStaticProperty('features'); $features[strtolower($in_feature)] = $in_hasFeature; } // }}} // {{{ hasFeature() /** * Check the capabilities for the current browser. * * Since the capabilities of client browsers vary widly, this interface * helps keep track of the core features of a client, such as if the client * supports dhtml, dom, javascript, etc. * * @param string $in_feature The feature to detect * * @access public * @return bool whether or not the current client has this feature */ function hasFeature($in_feature) { return (bool) Net_UserAgent_Detect::getFeature($in_feature); } // }}} // {{{ getFeature() /** * Get the capabilities for the current browser. * * Since the capabilities of client browsers vary widly, this interface * helps keep track of the core features of a client, such as if the client * supports dhtml, dom, javascript, etc. * * @param string $in_feature The feature to detect * * @access public * @return string value of the feature requested */ function getFeature($in_feature) { Net_UserAgent_Detect::detect(); $features = &Net_UserAgent_Detect::_getStaticProperty('features'); return isset($features[strtolower($in_feature)]) ? $features[strtolower($in_feature)] : null; } // }}} // {{{ getAcceptType() /** * Retrive the accept type for the current browser. * * To keep track of the mime-types, languages, charsets and encodings * that each browser accepts we use associative arrays for each type. * This function works like getBrowser() as it takes an expect list * and returns the first match. For instance, to find the language * you would pass in your allowed languages and see if any of the * languages set in the browser match. * * @param string $in_expectList values to check * @param string $in_type type of accept * * @access public * @return string the first matched value */ function getAcceptType($in_expectList, $in_type) { Net_UserAgent_Detect::detect(); $type = strtolower($in_type); if ($type == 'mimetype' || $type == 'language' || $type == 'charset' || $type == 'encoding') { $typeArray = &Net_UserAgent_Detect::_getStaticProperty($type); foreach((array) $in_expectList as $match) { if (!empty($typeArray[$match])) { return $match; } } } return null; } // }}} // {{{ setAcceptType() /** * Set the accept types for the current browser. * * To keep track of the mime-types, languages, charsets and encodings * that each browser accepts we use associative arrays for each type. * This function takes and array of accepted values for the type and * records them for retrieval. * * @param array $in_values values of the accept type * @param string $in_type type of accept * * @access public * @return void */ function setAcceptType($in_values, $in_type) { $type = strtolower($in_type); if ($type == 'mimetype' || $type == 'language' || $type == 'charset' || $type == 'encoding') { $typeArray = &Net_UserAgent_Detect::_getStaticProperty($type); foreach((array) $in_values as $value) { $typeArray[$value] = true; } } } // }}} // {{{ hasAcceptType() /** * Check the accept types for the current browser. * * To keep track of the mime-types, languages, charsets and encodings * that each browser accepts we use associative arrays for each type. * This function checks the array for the given type and determines if * the browser accepts it. * * @param string $in_value values to check * @param string $in_type type of accept * * @access public * @return bool whether or not the value is accept for this type */ function hasAcceptType($in_value, $in_type) { return (bool) Net_UserAgent_Detect::getAcceptType((array) $in_value, $in_type); } // }}} // {{{ getUserAgent() /** * Return the user agent string that is being worked on * * @access public * @return string user agent */ function getUserAgent() { Net_UserAgent_Detect::detect(); $userAgent = &Net_UserAgent_Detect::_getStaticProperty('userAgent'); return $userAgent; } // }}} // {{{ _getStaticProperty() /** * Copy of getStaticProperty() from PEAR.php to avoid having to * include PEAR.php * * @access private * @param string $var The variable to retrieve. * @return mixed A reference to the variable. If not set it will be * auto initialised to NULL. */ function &_getStaticProperty($var) { static $properties; return $properties[$var]; } // }}} } ?> catalog/libs/PEAR/OS/0000755577340101002240000000000010625430063016155 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/OS/Guess.php0000644577340101002240000002547010625430064017765 0ustar tonerlogicspg11675700000000000000 * @author Gregory Beaver * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Guess.php,v 1.25 2006/12/14 00:24:37 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since PEAR 0.1 */ // {{{ uname examples // php_uname() without args returns the same as 'uname -a', or a PHP-custom // string for Windows. // PHP versions prior to 4.3 return the uname of the host where PHP was built, // as of 4.3 it returns the uname of the host running the PHP code. // // PC RedHat Linux 7.1: // Linux host.example.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown // // PC Debian Potato: // Linux host 2.4.17 #2 SMP Tue Feb 12 15:10:04 CET 2002 i686 unknown // // PC FreeBSD 3.3: // FreeBSD host.example.com 3.3-STABLE FreeBSD 3.3-STABLE #0: Mon Feb 21 00:42:31 CET 2000 root@example.com:/usr/src/sys/compile/CONFIG i386 // // PC FreeBSD 4.3: // FreeBSD host.example.com 4.3-RELEASE FreeBSD 4.3-RELEASE #1: Mon Jun 25 11:19:43 EDT 2001 root@example.com:/usr/src/sys/compile/CONFIG i386 // // PC FreeBSD 4.5: // FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb 6 23:59:23 CET 2002 root@example.com:/usr/src/sys/compile/CONFIG i386 // // PC FreeBSD 4.5 w/uname from GNU shellutils: // FreeBSD host.example.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb i386 unknown // // HP 9000/712 HP-UX 10: // HP-UX iq B.10.10 A 9000/712 2008429113 two-user license // // HP 9000/712 HP-UX 10 w/uname from GNU shellutils: // HP-UX host B.10.10 A 9000/712 unknown // // IBM RS6000/550 AIX 4.3: // AIX host 3 4 000003531C00 // // AIX 4.3 w/uname from GNU shellutils: // AIX host 3 4 000003531C00 unknown // // SGI Onyx IRIX 6.5 w/uname from GNU shellutils: // IRIX64 host 6.5 01091820 IP19 mips // // SGI Onyx IRIX 6.5: // IRIX64 host 6.5 01091820 IP19 // // SparcStation 20 Solaris 8 w/uname from GNU shellutils: // SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc // // SparcStation 20 Solaris 8: // SunOS host.example.com 5.8 Generic_108528-12 sun4m sparc SUNW,SPARCstation-20 // // Mac OS X (Darwin) // Darwin home-eden.local 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh // // Mac OS X early versions // // }}} /* TODO: * - define endianness, to allow matchSignature("bigend") etc. */ /** * Retrieves information about the current operating system * * This class uses php_uname() to grok information about the current OS * * @category pear * @package PEAR * @author Stig Bakken * @author Gregory Beaver * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.5.0 * @link http://pear.php.net/package/PEAR * @since Class available since Release 0.1 */ class OS_Guess { var $sysname; var $nodename; var $cpu; var $release; var $extra; function OS_Guess($uname = null) { list($this->sysname, $this->release, $this->cpu, $this->extra, $this->nodename) = $this->parseSignature($uname); } function parseSignature($uname = null) { static $sysmap = array( 'HP-UX' => 'hpux', 'IRIX64' => 'irix', ); static $cpumap = array( 'i586' => 'i386', 'i686' => 'i386', 'ppc' => 'powerpc', ); if ($uname === null) { $uname = php_uname(); } $parts = split('[[:space:]]+', trim($uname)); $n = count($parts); $release = $machine = $cpu = ''; $sysname = $parts[0]; $nodename = $parts[1]; $cpu = $parts[$n-1]; $extra = ''; if ($cpu == 'unknown') { $cpu = $parts[$n-2]; } switch ($sysname) { case 'AIX' : $release = "$parts[3].$parts[2]"; break; case 'Windows' : switch ($parts[1]) { case '95/98': $release = '9x'; break; default: $release = $parts[1]; break; } $cpu = 'i386'; break; case 'Linux' : $extra = $this->_detectGlibcVersion(); // use only the first two digits from the kernel version $release = ereg_replace('^([[:digit:]]+\.[[:digit:]]+).*', '\1', $parts[2]); break; case 'Mac' : $sysname = 'darwin'; $nodename = $parts[2]; $release = $parts[3]; if ($cpu == 'Macintosh') { if ($parts[$n - 2] == 'Power') { $cpu = 'powerpc'; } } break; case 'Darwin' : if ($cpu == 'Macintosh') { if ($parts[$n - 2] == 'Power') { $cpu = 'powerpc'; } } $release = ereg_replace('^([[:digit:]]+\.[[:digit:]]+).*', '\1', $parts[2]); break; default: $release = ereg_replace('-.*', '', $parts[2]); break; } if (isset($sysmap[$sysname])) { $sysname = $sysmap[$sysname]; } else { $sysname = strtolower($sysname); } if (isset($cpumap[$cpu])) { $cpu = $cpumap[$cpu]; } return array($sysname, $release, $cpu, $extra, $nodename); } function _detectGlibcVersion() { static $glibc = false; if ($glibc !== false) { return $glibc; // no need to run this multiple times } $major = $minor = 0; include_once "System.php"; // Use glibc's header file to // get major and minor version number: if (@file_exists('/usr/include/features.h') && @is_readable('/usr/include/features.h')) { if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) { $features_file = fopen('/usr/include/features.h', 'rb'); while (!feof($features_file)) { $line = fgets($features_file, 8192); if (!$line || (strpos($line, '#define') === false)) { continue; } if (strpos($line, '__GLIBC__')) { // major version number #define __GLIBC__ version $line = preg_split('/\s+/', $line); $glibc_major = trim($line[2]); if (isset($glibc_minor)) { break; } continue; } if (strpos($line, '__GLIBC_MINOR__')) { // got the minor version number // #define __GLIBC_MINOR__ version $line = preg_split('/\s+/', $line); $glibc_minor = trim($line[2]); if (isset($glibc_major)) { break; } continue; } } fclose($features_file); if (!isset($glibc_major) || !isset($glibc_minor)) { return $glibc = ''; } return $glibc = 'glibc' . trim($glibc_major) . "." . trim($glibc_minor) ; } // no cpp $tmpfile = System::mktemp("glibctest"); $fp = fopen($tmpfile, "w"); fwrite($fp, "#include \n__GLIBC__ __GLIBC_MINOR__\n"); fclose($fp); $cpp = popen("/usr/bin/cpp $tmpfile", "r"); while ($line = fgets($cpp, 1024)) { if ($line{0} == '#' || trim($line) == '') { continue; } if (list($major, $minor) = explode(' ', trim($line))) { break; } } pclose($cpp); unlink($tmpfile); } // features.h if (!($major && $minor) && @is_link('/lib/libc.so.6')) { // Let's try reading the libc.so.6 symlink if (ereg('^libc-(.*)\.so$', basename(readlink('/lib/libc.so.6')), $matches)) { list($major, $minor) = explode('.', $matches[1]); } } if (!($major && $minor)) { return $glibc = ''; } return $glibc = "glibc{$major}.{$minor}"; } function getSignature() { if (empty($this->extra)) { return "{$this->sysname}-{$this->release}-{$this->cpu}"; } return "{$this->sysname}-{$this->release}-{$this->cpu}-{$this->extra}"; } function getSysname() { return $this->sysname; } function getNodename() { return $this->nodename; } function getCpu() { return $this->cpu; } function getRelease() { return $this->release; } function getExtra() { return $this->extra; } function matchSignature($match) { if (is_array($match)) { $fragments = $match; } else { $fragments = explode('-', $match); } $n = count($fragments); $matches = 0; if ($n > 0) { $matches += $this->_matchFragment($fragments[0], $this->sysname); } if ($n > 1) { $matches += $this->_matchFragment($fragments[1], $this->release); } if ($n > 2) { $matches += $this->_matchFragment($fragments[2], $this->cpu); } if ($n > 3) { $matches += $this->_matchFragment($fragments[3], $this->extra); } return ($matches == $n); } function _matchFragment($fragment, $value) { if (strcspn($fragment, '*?') < strlen($fragment)) { $reg = '^' . str_replace(array('*', '?', '/'), array('.*', '.', '\\/'), $fragment) . '$'; return eregi($reg, $value); } return ($fragment == '*' || !strcasecmp($fragment, $value)); } } /* * Local Variables: * indent-tabs-mode: nil * c-basic-offset: 4 * End: */ ?> catalog/libs/PEAR/PEAR/0000755577340101002240000000000010625430301016356 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/PEAR/Autoloader.php0000644577340101002240000001540210625430067021201 0ustar tonerlogicspg11675700000000000000 * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Autoloader.php,v 1.13 2006/01/06 04:47:36 cellog Exp $ * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader * @since File available since Release 0.1 * @deprecated File deprecated in Release 1.4.0a1 */ // /* vim: set expandtab tabstop=4 shiftwidth=4: */ if (!extension_loaded("overload")) { // die hard without ext/overload die("Rebuild PHP with the `overload' extension to use PEAR_Autoloader"); } /** * Include for PEAR_Error and PEAR classes */ require_once "PEAR.php"; /** * This class is for objects where you want to separate the code for * some methods into separate classes. This is useful if you have a * class with not-frequently-used methods that contain lots of code * that you would like to avoid always parsing. * * The PEAR_Autoloader class provides autoloading and aggregation. * The autoloading lets you set up in which classes the separated * methods are found. Aggregation is the technique used to import new * methods, an instance of each class providing separated methods is * stored and called every time the aggregated method is called. * * @category pear * @package PEAR * @author Stig Bakken * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.5.0 * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader * @since File available since Release 0.1 * @deprecated File deprecated in Release 1.4.0a1 */ class PEAR_Autoloader extends PEAR { // {{{ properties /** * Map of methods and classes where they are defined * * @var array * * @access private */ var $_autoload_map = array(); /** * Map of methods and aggregate objects * * @var array * * @access private */ var $_method_map = array(); // }}} // {{{ addAutoload() /** * Add one or more autoload entries. * * @param string $method which method to autoload * * @param string $classname (optional) which class to find the method in. * If the $method parameter is an array, this * parameter may be omitted (and will be ignored * if not), and the $method parameter will be * treated as an associative array with method * names as keys and class names as values. * * @return void * * @access public */ function addAutoload($method, $classname = null) { if (is_array($method)) { array_walk($method, create_function('$a,&$b', '$b = strtolower($b);')); $this->_autoload_map = array_merge($this->_autoload_map, $method); } else { $this->_autoload_map[strtolower($method)] = $classname; } } // }}} // {{{ removeAutoload() /** * Remove an autoload entry. * * @param string $method which method to remove the autoload entry for * * @return bool TRUE if an entry was removed, FALSE if not * * @access public */ function removeAutoload($method) { $method = strtolower($method); $ok = isset($this->_autoload_map[$method]); unset($this->_autoload_map[$method]); return $ok; } // }}} // {{{ addAggregateObject() /** * Add an aggregate object to this object. If the specified class * is not defined, loading it will be attempted following PEAR's * file naming scheme. All the methods in the class will be * aggregated, except private ones (name starting with an * underscore) and constructors. * * @param string $classname what class to instantiate for the object. * * @return void * * @access public */ function addAggregateObject($classname) { $classname = strtolower($classname); if (!class_exists($classname)) { $include_file = preg_replace('/[^a-z0-9]/i', '_', $classname); include_once $include_file; } $obj =& new $classname; $methods = get_class_methods($classname); foreach ($methods as $method) { // don't import priviate methods and constructors if ($method{0} != '_' && $method != $classname) { $this->_method_map[$method] = $obj; } } } // }}} // {{{ removeAggregateObject() /** * Remove an aggregate object. * * @param string $classname the class of the object to remove * * @return bool TRUE if an object was removed, FALSE if not * * @access public */ function removeAggregateObject($classname) { $ok = false; $classname = strtolower($classname); reset($this->_method_map); while (list($method, $obj) = each($this->_method_map)) { if (is_a($obj, $classname)) { unset($this->_method_map[$method]); $ok = true; } } return $ok; } // }}} // {{{ __call() /** * Overloaded object call handler, called each time an * undefined/aggregated method is invoked. This method repeats * the call in the right aggregate object and passes on the return * value. * * @param string $method which method that was called * * @param string $args An array of the parameters passed in the * original call * * @return mixed The return value from the aggregated method, or a PEAR * error if the called method was unknown. */ function __call($method, $args, &$retval) { $method = strtolower($method); if (empty($this->_method_map[$method]) && isset($this->_autoload_map[$method])) { $this->addAggregateObject($this->_autoload_map[$method]); } if (isset($this->_method_map[$method])) { $retval = call_user_func_array(array($this->_method_map[$method], $method), $args); return true; } return false; } // }}} } overload("PEAR_Autoloader"); ?> catalog/libs/PEAR/PEAR/Builder.php0000644577340101002240000003643310625430071020472 0ustar tonerlogicspg11675700000000000000 * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Builder.php,v 1.31 2007/01/10 05:32:51 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 * * TODO: log output parameters in PECL command line * TODO: msdev path in configuration */ /** * Needed for extending PEAR_Builder */ require_once 'PEAR/Common.php'; require_once 'PEAR/PackageFile.php'; /** * Class to handle building (compiling) extensions. * * @category pear * @package PEAR * @author Stig Bakken * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.5.0 * @link http://pear.php.net/package/PEAR * @since Class available since PHP 4.0.2 * @see http://pear.php.net/manual/en/core.ppm.pear-builder.php */ class PEAR_Builder extends PEAR_Common { // {{{ properties var $php_api_version = 0; var $zend_module_api_no = 0; var $zend_extension_api_no = 0; var $extensions_built = array(); /** * @var string Used for reporting when it is not possible to pass function * via extra parameter, e.g. log, msdevCallback */ var $current_callback = null; // used for msdev builds var $_lastline = null; var $_firstline = null; // }}} // {{{ constructor /** * PEAR_Builder constructor. * * @param object $ui user interface object (instance of PEAR_Frontend_*) * * @access public */ function PEAR_Builder(&$ui) { parent::PEAR_Common(); $this->setFrontendObject($ui); } // }}} // {{{ _build_win32() /** * Build an extension from source on windows. * requires msdev */ function _build_win32($descfile, $callback = null) { if (is_object($descfile)) { $pkg = $descfile; $descfile = $pkg->getPackageFile(); } else { $pf = &new PEAR_PackageFile($this->config, $this->debug); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pkg)) { return $pkg; } } $dir = dirname($descfile); $old_cwd = getcwd(); if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { return $this->raiseError("could not chdir to $dir"); } // packages that were in a .tar have the packagefile in this directory $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); if (file_exists($dir) && is_dir($vdir)) { if (chdir($vdir)) { $dir = getcwd(); } else { return $this->raiseError("could not chdir to " . realpath($vdir)); } } $this->log(2, "building in $dir"); $dsp = $pkg->getPackage().'.dsp'; if (!file_exists("$dir/$dsp")) { return $this->raiseError("The DSP $dsp does not exist."); } // XXX TODO: make release build type configurable $command = 'msdev '.$dsp.' /MAKE "'.$pkg->getPackage(). ' - Release"'; $err = $this->_runCommand($command, array(&$this, 'msdevCallback')); if (PEAR::isError($err)) { return $err; } // figure out the build platform and type $platform = 'Win32'; $buildtype = 'Release'; if (preg_match('/.*?'.$pkg->getPackage().'\s-\s(\w+)\s(.*?)-+/i',$this->_firstline,$matches)) { $platform = $matches[1]; $buildtype = $matches[2]; } if (preg_match('/(.*)?\s-\s(\d+).*?(\d+)/',$this->_lastline,$matches)) { if ($matches[2]) { // there were errors in the build return $this->raiseError("There were errors during compilation."); } $out = $matches[1]; } else { return $this->raiseError("Did not understand the completion status returned from msdev.exe."); } // msdev doesn't tell us the output directory :/ // open the dsp, find /out and use that directory $dsptext = join(file($dsp),''); // this regex depends on the build platform and type having been // correctly identified above. $regex ='/.*?!IF\s+"\$\(CFG\)"\s+==\s+("'. $pkg->getPackage().'\s-\s'. $platform.'\s'. $buildtype.'").*?'. '\/out:"(.*?)"/is'; if ($dsptext && preg_match($regex,$dsptext,$matches)) { // what we get back is a relative path to the output file itself. $outfile = realpath($matches[2]); } else { return $this->raiseError("Could not retrieve output information from $dsp."); } // realpath returns false if the file doesn't exist if ($outfile && copy($outfile, "$dir/$out")) { $outfile = "$dir/$out"; } $built_files[] = array( 'file' => "$outfile", 'php_api' => $this->php_api_version, 'zend_mod_api' => $this->zend_module_api_no, 'zend_ext_api' => $this->zend_extension_api_no, ); return $built_files; } // }}} // {{{ msdevCallback() function msdevCallback($what, $data) { if (!$this->_firstline) $this->_firstline = $data; $this->_lastline = $data; call_user_func($this->current_callback, $what, $data); } // }}} // {{{ _harventInstDir /** * @param string * @param string * @param array * @access private */ function _harvestInstDir($dest_prefix, $dirname, &$built_files) { $d = opendir($dirname); if (!$d) return false; $ret = true; while (($ent = readdir($d)) !== false) { if ($ent{0} == '.') continue; $full = $dirname . DIRECTORY_SEPARATOR . $ent; if (is_dir($full)) { if (!$this->_harvestInstDir( $dest_prefix . DIRECTORY_SEPARATOR . $ent, $full, $built_files)) { $ret = false; break; } } else { $dest = $dest_prefix . DIRECTORY_SEPARATOR . $ent; $built_files[] = array( 'file' => $full, 'dest' => $dest, 'php_api' => $this->php_api_version, 'zend_mod_api' => $this->zend_module_api_no, 'zend_ext_api' => $this->zend_extension_api_no, ); } } closedir($d); return $ret; } // }}} // {{{ build() /** * Build an extension from source. Runs "phpize" in the source * directory, but compiles in a temporary directory * (/var/tmp/pear-build-USER/PACKAGE-VERSION). * * @param string|PEAR_PackageFile_v* $descfile path to XML package description file, or * a PEAR_PackageFile object * * @param mixed $callback callback function used to report output, * see PEAR_Builder::_runCommand for details * * @return array an array of associative arrays with built files, * format: * array( array( 'file' => '/path/to/ext.so', * 'php_api' => YYYYMMDD, * 'zend_mod_api' => YYYYMMDD, * 'zend_ext_api' => YYYYMMDD ), * ... ) * * @access public * * @see PEAR_Builder::_runCommand */ function build($descfile, $callback = null) { $this->current_callback = $callback; if (PEAR_OS == "Windows") { return $this->_build_win32($descfile,$callback); } if (PEAR_OS != 'Unix') { return $this->raiseError("building extensions not supported on this platform"); } if (is_object($descfile)) { $pkg = $descfile; $descfile = $pkg->getPackageFile(); } else { $pf = &new PEAR_PackageFile($this->config); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pkg)) { return $pkg; } } $dir = dirname($descfile); $old_cwd = getcwd(); if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { return $this->raiseError("could not chdir to $dir"); } $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); if (is_dir($vdir)) { chdir($vdir); } $dir = getcwd(); $this->log(2, "building in $dir"); putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH')); $err = $this->_runCommand("phpize", array(&$this, 'phpizeCallback')); if (PEAR::isError($err)) { return $err; } if (!$err) { return $this->raiseError("`phpize' failed"); } // {{{ start of interactive part $configure_command = "$dir/configure"; $configure_options = $pkg->getConfigureOptions(); if ($configure_options) { foreach ($configure_options as $o) { $default = array_key_exists('default', $o) ? $o['default'] : null; list($r) = $this->ui->userDialog('build', array($o['prompt']), array('text'), array($default)); if (substr($o['name'], 0, 5) == 'with-' && ($r == 'yes' || $r == 'autodetect')) { $configure_command .= " --$o[name]"; } else { $configure_command .= " --$o[name]=".trim($r); } } } // }}} end of interactive part // FIXME make configurable if(!$user=getenv('USER')){ $user='defaultuser'; } $build_basedir = "/var/tmp/pear-build-$user"; $build_dir = "$build_basedir/$vdir"; $inst_dir = "$build_basedir/install-$vdir"; $this->log(1, "building in $build_dir"); if (is_dir($build_dir)) { System::rm(array('-rf', $build_dir)); } if (!System::mkDir(array('-p', $build_dir))) { return $this->raiseError("could not create build dir: $build_dir"); } $this->addTempFile($build_dir); if (!System::mkDir(array('-p', $inst_dir))) { return $this->raiseError("could not create temporary install dir: $inst_dir"); } $this->addTempFile($inst_dir); if (getenv('MAKE')) { $make_command = getenv('MAKE'); } else { $make_command = 'make'; } $to_run = array( $configure_command, $make_command, "$make_command INSTALL_ROOT=\"$inst_dir\" install", "find \"$inst_dir\" -ls" ); if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) { return $this->raiseError("could not chdir to $build_dir"); } putenv('PHP_PEAR_VERSION=1.5.0'); foreach ($to_run as $cmd) { $err = $this->_runCommand($cmd, $callback); if (PEAR::isError($err)) { chdir($old_cwd); return $err; } if (!$err) { chdir($old_cwd); return $this->raiseError("`$cmd' failed"); } } if (!($dp = opendir("modules"))) { chdir($old_cwd); return $this->raiseError("no `modules' directory found"); } $built_files = array(); $prefix = exec("php-config --prefix"); $this->_harvestInstDir($prefix, $inst_dir . DIRECTORY_SEPARATOR . $prefix, $built_files); chdir($old_cwd); return $built_files; } // }}} // {{{ phpizeCallback() /** * Message callback function used when running the "phpize" * program. Extracts the API numbers used. Ignores other message * types than "cmdoutput". * * @param string $what the type of message * @param mixed $data the message * * @return void * * @access public */ function phpizeCallback($what, $data) { if ($what != 'cmdoutput') { return; } $this->log(1, rtrim($data)); if (preg_match('/You should update your .aclocal.m4/', $data)) { return; } $matches = array(); if (preg_match('/^\s+(\S[^:]+):\s+(\d{8})/', $data, $matches)) { $member = preg_replace('/[^a-z]/', '_', strtolower($matches[1])); $apino = (int)$matches[2]; if (isset($this->$member)) { $this->$member = $apino; //$msg = sprintf("%-22s : %d", $matches[1], $apino); //$this->log(1, $msg); } } } // }}} // {{{ _runCommand() /** * Run an external command, using a message callback to report * output. The command will be run through popen and output is * reported for every line with a "cmdoutput" message with the * line string, including newlines, as payload. * * @param string $command the command to run * * @param mixed $callback (optional) function to use as message * callback * * @return bool whether the command was successful (exit code 0 * means success, any other means failure) * * @access private */ function _runCommand($command, $callback = null) { $this->log(1, "running: $command"); $pp = popen("$command 2>&1", "r"); if (!$pp) { return $this->raiseError("failed to run `$command'"); } if ($callback && $callback[0]->debug == 1) { $olddbg = $callback[0]->debug; $callback[0]->debug = 2; } while ($line = fgets($pp, 1024)) { if ($callback) { call_user_func($callback, 'cmdoutput', $line); } else { $this->log(2, rtrim($line)); } } if ($callback && isset($olddbg)) { $callback[0]->debug = $olddbg; } if (is_resource($pp)) { $exitcode = pclose($pp); } else { $exitcode = -1; } return ($exitcode == 0); } // }}} // {{{ log() function log($level, $msg) { if ($this->current_callback) { if ($this->debug >= $level) { call_user_func($this->current_callback, 'output', $msg); } return; } return PEAR_Common::log($level, $msg); } // }}} } ?> catalog/libs/PEAR/PEAR/ChannelFile/0000755577340101002240000000000010625430073020534 5ustar tonerlogicspg11675700000000000000catalog/libs/PEAR/PEAR/ChannelFile/Parser.php0000644577340101002240000000412010625430074022477 0ustar tonerlogicspg11675700000000000000 * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Parser.php,v 1.4 2006/01/06 04:47:36 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ /** * base xml parser class */ require_once 'PEAR/XMLParser.php'; require_once 'PEAR/ChannelFile.php'; /** * Parser for channel.xml * @category pear * @package PEAR * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.5.0 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ class PEAR_ChannelFile_Parser extends PEAR_XMLParser { var $_config; var $_logger; var $_registry; function setConfig(&$c) { $this->_config = &$c; $this->_registry = &$c->getRegistry(); } function setLogger(&$l) { $this->_logger = &$l; } function parse($data, $file) { if (PEAR::isError($err = parent::parse($data, $file))) { return $err; } $ret = new PEAR_ChannelFile; $ret->setConfig($this->_config); if (isset($this->_logger)) { $ret->setLogger($this->_logger); } $ret->fromArray($this->_unserializedData); // make sure the filelist is in the easy to read format needed $ret->flattenFilelist(); $ret->setPackagefile($file, $archive); return $ret; } } ?>catalog/libs/PEAR/PEAR/ChannelFile.php0000644577340101002240000015753110625430075021263 0ustar tonerlogicspg11675700000000000000 * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: ChannelFile.php,v 1.78 2006/10/31 02:54:40 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ /** * Needed for error handling */ require_once 'PEAR/ErrorStack.php'; require_once 'PEAR/XMLParser.php'; require_once 'PEAR/Common.php'; /** * Error code if the channel.xml tag does not contain a valid version */ define('PEAR_CHANNELFILE_ERROR_NO_VERSION', 1); /** * Error code if the channel.xml tag version is not supported (version 1.0 is the only supported version, * currently */ define('PEAR_CHANNELFILE_ERROR_INVALID_VERSION', 2); /** * Error code if parsing is attempted with no xml extension */ define('PEAR_CHANNELFILE_ERROR_NO_XML_EXT', 3); /** * Error code if creating the xml parser resource fails */ define('PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER', 4); /** * Error code used for all sax xml parsing errors */ define('PEAR_CHANNELFILE_ERROR_PARSER_ERROR', 5); /**#@+ * Validation errors */ /** * Error code when channel name is missing */ define('PEAR_CHANNELFILE_ERROR_NO_NAME', 6); /** * Error code when channel name is invalid */ define('PEAR_CHANNELFILE_ERROR_INVALID_NAME', 7); /** * Error code when channel summary is missing */ define('PEAR_CHANNELFILE_ERROR_NO_SUMMARY', 8); /** * Error code when channel summary is multi-line */ define('PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY', 9); /** * Error code when channel server is missing for xmlrpc or soap protocol */ define('PEAR_CHANNELFILE_ERROR_NO_HOST', 10); /** * Error code when channel server is invalid for xmlrpc or soap protocol */ define('PEAR_CHANNELFILE_ERROR_INVALID_HOST', 11); /** * Error code when a mirror name is invalid */ define('PEAR_CHANNELFILE_ERROR_INVALID_MIRROR', 21); /** * Error code when a mirror type is invalid */ define('PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE', 22); /** * Error code when an attempt is made to generate xml, but the parsed content is invalid */ define('PEAR_CHANNELFILE_ERROR_INVALID', 23); /** * Error code when an empty package name validate regex is passed in */ define('PEAR_CHANNELFILE_ERROR_EMPTY_REGEX', 24); /** * Error code when a tag has no version */ define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION', 25); /** * Error code when a tag has no name */ define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME', 26); /** * Error code when a tag has no name */ define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME', 27); /** * Error code when a tag has no version attribute */ define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION', 28); /** * Error code when a mirror does not exist but is called for in one of the set* * methods. */ define('PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND', 32); /** * Error code when a server port is not numeric */ define('PEAR_CHANNELFILE_ERROR_INVALID_PORT', 33); /** * Error code when contains no version attribute */ define('PEAR_CHANNELFILE_ERROR_NO_STATICVERSION', 34); /** * Error code when contains no type attribute in a protocol definition */ define('PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE', 35); /** * Error code when a mirror is defined and the channel.xml represents the __uri pseudo-channel */ define('PEAR_CHANNELFILE_URI_CANT_MIRROR', 36); /** * Error code when ssl attribute is present and is not "yes" */ define('PEAR_CHANNELFILE_ERROR_INVALID_SSL', 37); /**#@-*/ /** * Mirror types allowed. Currently only internet servers are recognized. */ $GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server'); /** * The Channel handling class * * @category pear * @package PEAR * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.5.0 * @link http://pear.php.net/package/PEAR * @since Class available since Release 1.4.0a1 */ class PEAR_ChannelFile { /** * @access private * @var PEAR_ErrorStack * @access private */ var $_stack; /** * Supported channel.xml versions, for parsing * @var array * @access private */ var $_supportedVersions = array('1.0'); /** * Parsed channel information * @var array * @access private */ var $_channelInfo; /** * index into the subchannels array, used for parsing xml * @var int * @access private */ var $_subchannelIndex; /** * index into the mirrors array, used for parsing xml * @var int * @access private */ var $_mirrorIndex; /** * Flag used to determine the validity of parsed content * @var boolean * @access private */ var $_isValid = false; function PEAR_ChannelFile() { $this->_stack = &new PEAR_ErrorStack('PEAR_ChannelFile'); $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); $this->_isValid = false; } /** * @return array * @access protected */ function _getErrorMessage() { return array( PEAR_CHANNELFILE_ERROR_INVALID_VERSION => 'While parsing channel.xml, an invalid version number "%version% was passed in, expecting one of %versions%', PEAR_CHANNELFILE_ERROR_NO_VERSION => 'No version number found in tag', PEAR_CHANNELFILE_ERROR_NO_XML_EXT => '%error%', PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER => 'Unable to create XML parser', PEAR_CHANNELFILE_ERROR_PARSER_ERROR => '%error%', PEAR_CHANNELFILE_ERROR_NO_NAME => 'Missing channel name', PEAR_CHANNELFILE_ERROR_INVALID_NAME => 'Invalid channel %tag% "%name%"', PEAR_CHANNELFILE_ERROR_NO_SUMMARY => 'Missing channel summary', PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY => 'Channel summary should be on one line, but is multi-line', PEAR_CHANNELFILE_ERROR_NO_HOST => 'Missing channel server for %type% server', PEAR_CHANNELFILE_ERROR_INVALID_HOST => 'Server name "%server%" is invalid for %type% server', PEAR_CHANNELFILE_ERROR_INVALID_MIRROR => 'Invalid mirror name "%name%", mirror type %type%', PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE => 'Invalid mirror type "%type%"', PEAR_CHANNELFILE_ERROR_INVALID => 'Cannot generate xml, contents are invalid', PEAR_CHANNELFILE_ERROR_EMPTY_REGEX => 'packagenameregex cannot be empty', PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION => '%parent% %protocol% function has no version', PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME => '%parent% %protocol% function has no name', PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE => '%parent% rest baseurl has no type', PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME => 'Validation package has no name in tag', PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION => 'Validation package "%package%" has no version', PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND => 'Mirror "%mirror%" does not exist', PEAR_CHANNELFILE_ERROR_INVALID_PORT => 'Port "%port%" must be numeric', PEAR_CHANNELFILE_ERROR_NO_STATICVERSION => ' tag must contain version attribute', PEAR_CHANNELFILE_URI_CANT_MIRROR => 'The __uri pseudo-channel cannot have mirrors', PEAR_CHANNELFILE_ERROR_INVALID_SSL => '%server% has invalid ssl attribute "%ssl%" can only be yes or not present', ); } /** * @param string contents of package.xml file * @return bool success of parsing */ function fromXmlString($data) { if (preg_match('/_supportedVersions)) { $this->_stack->push(PEAR_CHANNELFILE_ERROR_INVALID_VERSION, 'error', array('version' => $channelversion[1])); return false; } $parser = new PEAR_XMLParser; $result = $parser->parse($data); if ($result !== true) { if ($result->getCode() == 1) { $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_XML_EXT, 'error', array('error' => $error)); } else { $this->_stack->push(PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER, 'error'); } return false; } $this->_channelInfo = $parser->getData(); return true; } else { $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_VERSION, 'error', array('xml' => $data)); return false; } } /** * @return array */ function toArray() { if (!$this->_isValid && !$this->validate()) { return false; } return $this->_channelInfo; } /** * @param array * @static * @return PEAR_ChannelFile|false false if invalid */ function &fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack') { $a = new PEAR_ChannelFile($compatibility, $stackClass); $a->_fromArray($data); if (!$a->validate()) { $a = false; return $a; } return $a; } /** * Unlike {@link fromArray()} this does not do any validation * @param array * @static * @return PEAR_ChannelFile */ function &fromArrayWithErrors($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack') { $a = new PEAR_ChannelFile($compatibility, $stackClass); $a->_fromArray($data); return $a; } /** * @param array * @access private */ function _fromArray($data) { $this->_channelInfo = $data; } /** * Wrapper to {@link PEAR_ErrorStack::getErrors()} * @param boolean determines whether to purge the error stack after retrieving * @return array */ function getErrors($purge = false) { return $this->_stack->getErrors($purge); } /** * Unindent given string (?) * * @param string $str The string that has to be unindented. * @return string * @access private */ function _unIndent($str) { // remove leading newlines $str = preg_replace('/^[\r\n]+/', '', $str); // find whitespace at the beginning of the first line $indent_len = strspn($str, " \t"); $indent = substr($str, 0, $indent_len); $data = ''; // remove the same amount of whitespace from following lines foreach (explode("\n", $str) as $line) { if (substr($line, 0, $indent_len) == $indent) { $data .= substr($line, $indent_len) . "\n"; } } return $data; } /** * Parse a channel.xml file. Expects the name of * a channel xml file as input. * * @param string $descfile name of channel xml file * @return bool success of parsing */ function fromXmlFile($descfile) { if (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) || (!$fp = fopen($descfile, 'r'))) { require_once 'PEAR.php'; return PEAR::raiseError("Unable to open $descfile"); } // read the whole thing so we only get one cdata callback // for each block of cdata fclose($fp); $data = file_get_contents($descfile); return $this->fromXmlString($data); } /** * Parse channel information from different sources * * This method is able to extract information about a channel * from an .xml file or a string * * @access public * @param string Filename of the source or the source itself * @return bool */ function fromAny($info) { if (is_string($info) && file_exists($info) && strlen($info) < 255) { $tmp = substr($info, -4); if ($tmp == '.xml') { $info = $this->fromXmlFile($info); } else { $fp = fopen($info, "r"); $test = fread($fp, 5); fclose($fp); if ($test == "fromXmlFile($info); } } if (PEAR::isError($info)) { require_once 'PEAR.php'; return PEAR::raiseError($info); } } if (is_string($info)) { $info = $this->fromXmlString($info); } return $info; } /** * Return an XML document based on previous parsing and modifications * * @return string XML data * * @access public */ function toXml() { if (!$this->_isValid && !$this->validate()) { $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID); return false; } if (!isset($this->_channelInfo['attribs']['version'])) { $this->_channelInfo['attribs']['version'] = '1.0'; } $channelInfo = $this->_channelInfo; $ret = "\n"; $ret .= " $channelInfo[name] " . htmlspecialchars($channelInfo['summary'])." "; if (isset($channelInfo['suggestedalias'])) { $ret .= ' ' . $channelInfo['suggestedalias'] . "\n"; } if (isset($channelInfo['validatepackage'])) { $ret .= ' ' . htmlspecialchars($channelInfo['validatepackage']['_content']) . "\n"; } $ret .= " \n"; $ret .= ' _makeXmlrpcXml($channelInfo['servers']['primary']['xmlrpc'], ' '); } if (isset($channelInfo['servers']['primary']['rest'])) { $ret .= $this->_makeRestXml($channelInfo['servers']['primary']['rest'], ' '); } if (isset($channelInfo['servers']['primary']['soap'])) { $ret .= $this->_makeSoapXml($channelInfo['servers']['primary']['soap'], ' '); } $ret .= " \n"; if (isset($channelInfo['servers']['mirror'])) { $ret .= $this->_makeMirrorsXml($channelInfo); } $ret .= " \n"; $ret .= ""; return str_replace("\r", "\n", str_replace("\r\n", "\n", $ret)); } /** * Generate the tag * @access private */ function _makeXmlrpcXml($info, $indent) { $ret = $indent . "_makeFunctionsXml($info['function'], "$indent "); $ret .= $indent . "\n"; return $ret; } /** * Generate the tag * @access private */ function _makeSoapXml($info, $indent) { $ret = $indent . "_makeFunctionsXml($info['function'], "$indent "); $ret .= $indent . "\n"; return $ret; } /** * Generate the tag * @access private */ function _makeRestXml($info, $indent) { $ret = $indent . "\n"; if (!isset($info['baseurl'][0])) { $info['baseurl'] = array($info['baseurl']); } foreach ($info['baseurl'] as $url) { $ret .= "$indent \n"; } $ret .= $indent . "\n"; return $ret; } /** * Generate the tag * @access private */ function _makeMirrorsXml($channelInfo) { $ret =